Howdy!

Thanks for releasing this module, it's a great start!

I want to have the adwords conversion code on every page. Maybe this is abnormal! Maybe not (it's a remarketing campaign). I'm just following my clients instructions here.

I tried adding "ID|*" to the Label|Pages field, but it was not respected.

Is there a way to include the code on every page? Maybe it would make more sense to be able to set a default ID that is shown on every page, and have the Label|Pages section as an override?

CommentFileSizeAuthor
#4 fix_non_node_pages-1219306-3.patch3.15 KBfirebus

Comments

firebus’s picture

Title: Lable|Page doesn't accept * » Conversion code doesn't show up on front page

aha! all other pages work, but does not.

i'm guessing i'm doing something with my template that is incompatible with how google_adwords injects it's code. i'll take a look.

firebus’s picture

Version: 6.x-1.4 » 6.x-1.x-dev

nope. this happens on a bare install of d6 and google_adwords. there seems to be no way to get get conversion tracking working on the front page

firebus’s picture

Priority: Normal » Critical

ahh. the problem here is that google_adwords is using hook_node_api, which means it will not work on any page that is not a node, no matter what you have in the paths array. that's a critical bug.

you want to use either hook_init() or module_preprocess_page(). you could also extend your use of hook_footer(). that might be the easiest path. i'll give that a try...

firebus’s picture

Assigned: Unassigned » firebus
Status: Active » Needs review
StatusFileSize
new3.15 KB

here's a patch that gets rid of the view case in hook_nodeapi and replaces it with a call to _google_adwords_view_adwords in hook_footer.

to handle cases where we are not viewing a node without having to refactor too much of the existing logic, we create an empty node object to pass to _google_adwords_view_adwords.

firebus’s picture

Title: Conversion code doesn't show up on front page » Conversion code doesn't show up on non-node pages
Preston McMurry’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Status: Needs review » Reviewed & tested by the community

Confirmed to now generate conversion javascript to page where it was not previously generated to. (With same data in config screens.) Proven to work in conjunction with the "INSERT INTO google_adwords" patch ( http://drupal.org/node/1135348 ).

NaX’s picture

Manually applied #4 to dev and it work perfectly for me. Used it with a webform.

zionduc’s picture

Thank you Firebus for the patch.
Applied #4 to 6.x-1.4 and it works like charm.

perignon’s picture

Although I'm not a D6 guy. I will see if I can get this applied and committed.

perignon’s picture

Assigned: firebus » perignon
Issue summary: View changes
perignon’s picture

Committed and pushed. Can I get a review on this by someone with D6?

dgitonga’s picture

Tested on D6.28 - confirming AdWords tracking code on non-node page.
Thanks for the module and patch - time saver.

perignon’s picture

Sounds good!

rooby’s picture

Seems like this has been fixed, but status of the issue says otherwise.

Is this something that should be ported to Drupal 7? or should this issue be marked fixed?

perignon’s picture

I have not had any request on Drupal 7 for this patch. I honestly haven't looked into what it does because I don't have Drupal 6 or run it.

perignon’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.