How to Get Google AdWords Conversion Tracking on WordPress

By John Somerton • August 6th, 2008

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.

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.

Social media votes are noticed and appreciated: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Sphinn
  • Technorati
  • Digg
  • StumbleUpon
  • del.icio.us
  • Twitter

Technorati Tags: AdWords, conversion, WordPress

Comments

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?

By John Somerton on August 22nd, 2008 at 8:50 pm

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

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.

By John Somerton on August 29th, 2008 at 11:25 am

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.

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

By John Somerton on September 6th, 2008 at 2:32 pm

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…

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.

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.

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.

 

Leave a Comment

« Compete vs. Alexa and the Dangers of Toolbar Metrics | Home | Web Design SEO Tips - Build a Search Engine Ranking You Can Be Proud Of »

Popular

Notes

  • Email Newsletter

    Subscribe to our newsletter to receive the latest news, tips, and updates direct to your inbox.
    Name:
    Email: