SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best way to add Adwords Conversion tracking code to WP?

    Good timing on the WP forum!

    I've been googling ways to add Adwords Conversion tracking code to WP and the best method so far seems to be to create a custom 'thankyou' page with the conversion tracking code on it and redirect the contact form to it. I'd prefer the code to be on the actual contact page though, you get a few more false positives that way but you'll also pick up people who only wanted the phone number instead of just the poeple who email.

    Seems a bit bodgy though, just wondering if any WP experts on here know a better way? In Joomla it would be as simple as creating a module and only allowing it to be active on the contact page, dead simple, can't believe it's not that easy with WP?
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Can't you just go into 'html view' when editing your contact page, and add the adwords conversion tracking code?
    I never did it myself, but I took the tracking code from this site and added it to a test page, and it displayed perfectly fine in the html of the test page. Don't know if that's all there is to it though?

  3. #3
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Guido, thanks for your help. I'm not familiar with WP, if it's that simple why are there so many people asking how to do it on Google and all the answers seem to be fairly convoluted?
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I don't know. You might give it a try

  5. #5
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Inserting the code directly into the HTML doesn't work, if you try to do it with the WYSIWYG editor still active it just strips out half the code and if you disable the editor WP is wrapping some of the code in <p> tags and inserting <br> too which will most likely stop the code working as well as creating a bit of empty space on the page where the code is.

    I'm going to try creating a new template containing the conversion tracking code which should be as simple as copying the defauilt template, giving it a new name using the PHP code below and it will then appear in the dropdown menu on the page itself and can be applied quite easily.

    <?php
    /*
    Template Name: INSERT NAME HERE
    */
    ?>
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  6. #6
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,361
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    can you not set up two tracking codes:

    First one goes on your contact page to monitor how many visits that page gets
    Second one is in you "thanks" template, perhaps you could embed this template after successful form submission?

  7. #7
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bluedreamer View Post
    can you not set up two tracking codes:

    First one goes on your contact page to monitor how many visits that page gets
    Second one is in you "thanks" template, perhaps you could embed this template after successful form submission?
    I'd be happy to get one tracking code working.... It's adding it to just one page on the client's site that's proving so difficult with Wordpress. Just that on it's own makes me want to stay with Joomla.

    I see what you're saying though but it would make a bit of a mess of the PPC conversion stats if email conversions showed up twice in the summary tables. People starting on a PPC Ad and landing on the contact page would show as a conversion and if they then emailed using the form they'd show up again as a conversion.
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  8. #8
    SitePoint Wizard bronze trophy hooperman's Avatar
    Join Date
    Jan 2006
    Location
    Manchester, UK
    Posts
    4,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How have you setup your contact page? If you're using a plugin, you might be able to edit the code for the plugin itself, not the code for the contact page. Plugins > Installed > Edit (on the plugin).

    Not sure that helps as I've not done this myself.

  9. #9
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, finally got it working I think. The lightbulb moment was when I realised that in creating a new template for WP I should have been copying and renaming the 'page.php' file (in the 'wp-content/themes/default/' directory) and not the 'index.php' file. Doh.

    Copy the page.php file, rename it and insert the PHP snippet above as well as your conversion tracking code and assign it to the page you want to identify conversion for using the template drop down menu on the right hand side of WP.

    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  10. #10
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,361
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JJMcClure View Post
    I see what you're saying though but it would make a bit of a mess of the PPC conversion stats if email conversions showed up twice in the summary tables. People starting on a PPC Ad and landing on the contact page would show as a conversion and if they then emailed using the form they'd show up again as a conversion.
    Wouldn't you use "Goals" to measure landing/completion pages? This might then give you a % of people who landed and completed the contact form (or not), so you could measure a success rate.

  11. #11
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Goals are used more to track user paths through a site, if all you're doing is creating a path that goes 'some page-contact page' then PPC stats do that equally well since it'll tell me what keyword phrase generated the click and I know what the destination URL is for the Ad group.

    If I create more complex Goals e.g. home-page - content page - contact page - thank you page' then I get information about the IA of my site but it doesn't add anything to my PPC conversion tracking where all I need to know is if the visitor started on a PPC Ad and ended up contacting my client.
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  12. #12
    SitePoint Member
    Join Date
    Jan 2008
    Location
    Ottawa, ON, Canada
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JJ, modifying the templates is a quick and easy approach if you just have one or two pages to add the tracking code to.

    The approach Guido mentioned and outlined here (disclosure - I authored the post) will let you add the tracking code on a per-page basis, using the custom fields available in WordPress:

    http://www.ozonesem.com/web-analytics/how-to-get-google-adwords-conversion-tracking-on-wordpress.html


    Cheers!

  13. #13
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wizofoz View Post
    JJ, modifying the templates is a quick and easy approach if you just have one or two pages to add the tracking code to.

    The approach Guido mentioned and outlined here (disclosure - I authored the post) will let you add the tracking code on a per-page basis, using the custom fields available in WordPress:

    http://www.ozonesem.com/web-analytics/how-to-get-google-adwords-conversion-tracking-on-wordpress.html


    Cheers!
    Hey Wiz, yep very familiar with post, it ranks well for searches on this subject! As you say it's a bit of a convoluted for me and my one page requirement.

    I thought though that a change had been made to Optimiser that stopped your method from working? Sure I read that somewhere on a forum.
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •