How to Get Google AdWords Conversion Tracking on WordPress

Getting the dreaded “Verification Failed” message when trying to add AdWords conversion tracking to your WordPress blog?

AdWords Conversion Tracking WordPress Verification Failed

Look no further! Here’s a simple fix (a little bit of a hack) that will get you tracking Google AdWords conversions on your WordPress pages in no time flat.

Step 1 – Install Website Optimizer Plugin

Download, install, and activate the Google Website Optimizer Plugin for WordPress. This plugin is intended for use with Google’s Website Optimizer, but in this case we’re going to use it for tracking AdWords conversions instead.

Google AdWords Tracking Professionally Installed On Your WordPress Site For Just $49

If you need help installing the tracking code we can do it for you. Enter your email address and website URL in the fields below, click Buy Now to pay securely with PayPal, and we’ll contact you within one business day to arrange installation.


Website:
Email:




Step 2 – Grab (Copy) Your AdWords Conversion Tracking Code

In your AdWords account, grab the code snippet for the conversion action you want to track and copy it to your clipboard. The conversion tracking code looks something like:

<!-- Google Code for Web Design Mistakes Signup Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = XXXXXXXXXX;
var google_conversion_language = "en_US";
var google_conversion_format = "1";
var google_conversion_color = "ffffff";
var google_conversion_label = "lqn9CIa8VRDXhf7-Aw";
//-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height="1" width="1" border="0" src="http://www.googleadservices.com/pagead/conversion/XXXXXXXXXX/
?label=lqn9CIa8VRDXhf7-Aw&script=0"/>
</noscript>

Step 3 – Add The Tracking Code As A Custom Field

Update: BEFORE you add and save the tracking code, note the following important caveat pulled from the website optimizer plugin readme.txt:

  • Make sure the WYSIWYG editor is disabled in the WordPress administration area under “My Account” – uncheck “Use the visual editor when writing”. Switching between the “Visual” and “code” tabs in the 2.1.x WYSIWYG editor won’t work – it needs to be disabled.

In the WordPress admin, navigate to the page you want to add conversion tracking to, and scroll down to the Custom Fields section under Advanced Options:

Website Optimizer WordPress Configuration

1) In the Key field, enter the website optimizer key for tracking conversions: go_tracking_script_conversion

2) In the Value field, paste your AdWords conversion tracking code in its entirety.

3) Click Add Custom Field and then Save / Publish your post. Make sure your post is not set to “private” otherwise the Google verification checker will not be able to see and therefore verify that tracking is installed correctly.

Step 4 – Verify Action Code

Go back to your Google AdWords account and verify that the action code is installed correctly. If you followed the steps above, everything should be installed correctly and you should see the success message!

AdWords Conversion Tracking WordPress Verification Success

There you have it -now you have an easy way to track AdWords conversions on your WordPress blog.

A few caveats to keep in mind:

  • This plugin is designed to be used with Website Optimizer – not AdWords Conversion Testing. I have not tested whether it can be used simultaneously to track both.
  • Tested on WordPress 2.5. Your mileage may vary, although I think this method should work on any version supported by the Website Optimizer plugin.
  • As noted in step 3, be sure to disable the WYSIWYG editor before adding the tracking code.

P.S. How are you tracking conversions on your WordPress blog? Share some of your favorite plugins and methods in the comments below.

Update Nov 3, 2009:

If you prefer to code the tracking directly into your WordPress templates, here is an excellent tutorial for doing just that:

http://www.internetmegaphone.com/how-to-use-google-conversion-tracking-in-wordpress/

About John Somerton

John Somerton is a web marketing strategist and creator of the Keyword Unity methodology for developing search engine marketing strategy. He lives in St. John's, Newfoundland, Canada.

Comments

  1. Moe says:

    I’m not able to save a new Key, for some reason. Every time I paste go_tracking_script_conversion, then my Adwords conversion code, and click “Add Custom Field” the screen refreshes and the Key hasn’t been saved.

    Any ideas how to fix that?

  2. John Somerton says:

    Moe, what version of WordPress are you using?

    Here’s the supported version info (including a patch requirement) from the contentrobot.com website:

    The current version (v0.2) works with WordPress 2.x* and above (Including 2.5)

    *Important Note: If you are running WordPress versions 2.0.x, you must patch /wp-includes/functions-formatting.php to fix this WordPress bug. If you do not apply the patch, any parenthesis characters will be converted to the html equivalent (#8221;) and will cause the Google Website Optimizer section scripts to fail. This bug has been fixed in WordPress 2.1.x

  3. David says:

    This is not working. I’ve followed the instructions and it is entered into the code on the following page:

    http://www.paddlesurfholidays.com/contact-us/contact-success

    It still gives a verification error.

  4. John Somerton says:

    David, I had a look at the source of your page and noticed <br/> tags after the lines of your Google conversion code – a sure sign that WordPress didn’t save it properly.

    After going back to the website optimizer plugin readme, I noticed I had left out an important step that may be causing your problem. I’ve updated Step 3 in the post – I suspect your problem is being caused by not having the WYSIWYG disabled when you add your tracking code:

    Make sure the WYSIWYG editor is disabled in the WordPress administration area under “My Account” – uncheck “Use the visual editor when writing”. Switching between the “Visual” and “code” tabs in the 2.1.x WYSIWYG editor won’t work – it needs to be disabled.

    Try disabling it, running through the steps again and let me know how it goes.

  5. David says:

    Hi John–

    I have the same problem as with the paddle surf holiday website.

    I’ve done everything you said, including turning off the visual editor and the Adwords Conversion Tracking is still giving me an error of “verification failed”.

    I know from the last time this plugin does not work with WP Shopping Cart, therefore it had to be disabled. I’m thinking this plugin is friendly with the other plugins we are using.

    What are your thoughts?

    http://www.customstickersdirect.com/order/order-success

  6. John Somerton says:

    Hi David – for some reason both of your success pages are still showing the linebreaks – I really think that is the source of your problem but I’m not sure why they’re there if you have in fact turned off (and I mean completely disabled for the user) the visual editor.

    If you look at the source of this page – http://www.ozonesem.com/web-design-seo-mistakes/subscription-confirmed – you’ll see there are no <br/> tags in the code block for the conversion code. Conversion tracking works for that page.

    It’s almost certainly a problem with the visual editor…

  7. Moe says:

    Hi again – still frustrated.

    I followed all the instructions (including turning off visual editor) without success.

    I looked at the source code of my page, and it’s showing a tag after the Google converson script. I have no idea how to remove this, though. The is before my footer PHP file.

  8. Moe says:

    I figured it out. You have to create a separate WP page template for your thank-you page, and insert the conversion code in that page.

  9. Taylor says:

    Thanks for the post. I had some trouble at first, but then I discovered this: After I saved the custom field, it automatically replaced every ” with \”. I got around it by, re-pasting the code in the “value” box and clicking “Update”. This will not replace all of the quote marks, so when I saved the post, it looks right.

  10. HeyNow says:

    Has anyone noticed that this method stopped working with version 1.2 of the plugin?

  11. Alan says:

    Hi, does this work with more than one AdWords account to track?

    I have installed the code an Opt-In ThankYou page to track subscribers from an AdWords campaign. Now I want to track another campaign from a completely different AdWords account.

    I have another action code to add, but I notice that the Custom Field name is the same ie “go_tracking_script_conversion” even though the Action Code is different (for the second AdWords accounts).

    So could I still add the second (and third and so on) Action Code, or would it not work because the Custom Field name is the same?

  12. Dave says:

    THANKS for this guide!

    Clever idea. Always challenging to insert tracking code in WP, but this worked like a charm!

  13. JW says:

    Where do you find the option to add custom field? I can’t seem to locate that.

    J

    • Hi JW, in the top right corner of the editing page you should see a “Screen Options” drop-down. Click that to expand and then click to enable the Custom Fields.

Speak Your Mind

*