Getting the dreaded “Verification Failed” message when trying to add AdWords conversion tracking to your WordPress blog?
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 -->
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";
<img height="1" width="1" border="0" src="http://www.googleadservices.com/pagead/conversion/XXXXXXXXXX/
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:
1) In the Key field, enter the website optimizer key for tracking conversions:
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!
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: