GWO WordPress Plugin

This plugin integrates Google Website Optimizer with WordPress. NOTE Screenshot is out of date

You don’t have to change anything in your WordPress files or templates to get this plugin to work. Every page and post can  be made into either a testpage(landingpage) or a goal(conversionpage) with a click of a button. If you want a link click to count as a conversion then click the conversion link menu button.


Just upload the plugin folder via FTP or upload the zip using Plugins-Add new in the WordPress Admin menu.

Creating test and goal pages

When you get to the Add new (page/post) screen you find three new icons in the menu Menu items. The [ ] icon is used for making “Page sections”. You can insert them and then add then add stuff between the tags or you can select a portion of the text and then click the icon and the tags will wrap around the selection.

The two “arrow” icons are used for tagging or untagging a link as a conversion link. A conversion link is often used instead of a goal page when you can’t or don’t want to make a page a goal.

Ordinary linkWhen you click on a link in the editor that is not a conversion link the middle icon becomes clickable and you can tag a link as a conversion link.

Conversion linkThe untagging icon becomes clickable when you click on a conversion link.

You’ll find a new section on the post/page called “GWO”.

Tracking code is the combined “control and tracking script”.

Page/Post settings


  • Added support for A/B experiments

Download latest version at

If you are using Thesis you need to write something in the SEO Description box otherwise the test validation will fail. (Thx to Alek Novi for reporting this)

69 Responses to “GWO WordPress Plugin”

  1. Ryan Nagy
    September 11, 2009 at 22:28 #

    I haven’t tested this yet, but it it does work, god bless you, and your family, and descendants and may you live a long, happy, prosperous life.


    I use GWO for many sites, but have not been able to integrate on some of my WP landing pages.

    - Ryan

    • Andreas
      September 12, 2009 at 00:39 #

      It validates correctly etc. The GWO reports are really slow for me and numbers are not always correct but thats even without the plugin so hard to know 100%.
      So it would be good if more people tested it =).

  2. Separatista
    November 12, 2009 at 15:12 #

    Hi, is it possible to set up only time tests (conversion = 30 sec on page) with your plugin? And how? Thank you for your help…

    • Andreas
      December 2, 2009 at 14:26 #

      You can do that with a custom javascript and checking “Page uses link click as conversion(goal): ” when updating the page. Just need a custom javascript that calls the conversion functions ( ConversionCount(); ) after 30seconds.

    • Sheriff
      October 25, 2011 at 23:12 #

      hey Andreas,

      Great plugin you have here.

      I do have a question… I have one thank you page for multiple pages. I want to A/B test several of these pages, but they all lead to the same goal page. GWO wants me to ad a different test id for each A/B testing I do, which means that the goal page would get multple test ids. Is there a way to do that with your plugin?

  3. Hjalte
    December 8, 2009 at 02:45 #

    Thank you, thank you, thank you…

  4. Andres Ferraro
    February 8, 2010 at 19:59 #

    Going to try out your plug in! Seems to be the most complete one. Thank you so much!

  5. Alek
    December 29, 2010 at 02:36 #

    If you are rocking THESIS, this plugin will not work out of the box for you… In fact you will get a bunch of errors when trying to validate the page such as:

    Control script — Errors found: 1
    Page sections — validating…
    Page sections — Detected: 4 / Errors found: 4

    * name1
    * name2
    * name3
    * name4

    Tracking script — validating…
    Tracking script — installation complete
    Tracking script — Errors found: 1
    Conversion page URL:
    Conversion script — validating…
    Conversion script — installation complete
    Conversion script — Errors found: 1

    Control script — Errors found: 1
    Page sections — validating…
    Page sections — Detected: 4 / Errors found: 4

    And under the actual page sections part, this is what it says…

    name1- Unexpected or missing characters – Line: 7 Expected: <script
    name2 – Unexpected or missing characters – Line: 7 Expected: <script
    name3 – Unexpected or missing characters – Line: 7 Expected: <script
    name4 – Unexpected or missing characters – Line: 7 Expected: <script

    "name1" etc is the names I've given to the sections of course, using your section inserting button.

    This is what it says under tracking script:
    Tracking script not detected on conversion page

    This is what it says under control script:
    Control script was found after sections, it must be before them.

    **The SOLUTION**

    The problem is that if you don't put anything into the seo desription box of a post, thesis mirrors whatever you had in the post, so you get the GWO code doubled.

    Solution? Simple, don't be lazy… Put in a meta description/title for the post, and the plugin will work fine :)

  6. Brecht
    January 20, 2011 at 16:45 #

    Is there a way to get shortcodes to work with this?

    I have different wordtube videos in pages with shortcodes also gravity forms in shortcodes and I can’t get them to display, just the codes display.

    thank you

    • Andreas Nurbo
      January 20, 2011 at 17:15 #

      What exactly do you mean “just the codes display”?
      Which code is displayed?

      I have no problem using gravity form shortcode with this plugin.
      You can’t however just paste the shortcode into the section area over at Google Weboptimizer (if you are doing multivariate testing). Need to copy paste the shortcode generated HTML.

  7. Eric Heide
    January 22, 2011 at 22:23 #

    Andreas, According to Google they recently updated the scripts at Website Optimizer.

    I’m looking at setting up tests in the near future, apparently everyone has to get the updated scripts, will they be compatible with this plugin?

    • Andreas Nurbo
      January 22, 2011 at 23:43 #

      I updated the scripts in the plugin to conform with the change in December have not updated to the change made January 5 since I wasn’t aware of it until now. I’ll have to search around a little to see if its possible to just change to the new tracking code if it is I’ll have an update out in a day or two.

  8. Brad
    January 25, 2011 at 00:00 #


    Just found your site today – nice work. Installed the plugin and having validation problems. Then I saw that there are changes from just a few days ago…damn.

    Do you have an eta on the updates?


  9. Chris
    February 14, 2011 at 16:28 #

    Hi Andreas, really like this plugin, started using it a couple of weeks ago. When I updated to 11.2.1 this error appeared in the site footer:

    Warning: call_user_func_array() []: First argument is expected to be a valid callback, ‘GWO::printFooter’ was given in /htdocs/blog/wp-includes/plugin.php on line 395

    I’m going to try reverting back to 11.1.1. Would greatly appreciate any tips you can give.

    • Andreas Nurbo
      February 14, 2011 at 17:09 #

      Fixed it. so new version is 11.2.2.

      • Chris
        February 14, 2011 at 19:13 #

        Just updated to 11.2.2 and that solved it. Thanks for handling this so quickly.

  10. Sher
    February 15, 2011 at 20:32 #

    Hi Andreas,

    I can’t get my control page to validate. GWO combines the control and tracking code. When I paste in the code to the Extract test id box, it strips the control code. GWO reports that it can’t find the control code. I tried inserting the test id and account id manually, but it still doesn’t work. My other pages are validating fine. What do I need to do differently?


    • Andreas Nurbo
      February 15, 2011 at 20:45 #

      Just paste the combined “control and tracking script” into “Extract account/test id from tracking code:” The plugin handles everything else.
      Suppose I should add “control and” before.

  11. Sher
    February 15, 2011 at 22:25 #

    Thanks for responding so quickly. This is what I’m getting when I paste in the code:

    “The control script on the test page has errors. Please make sure you have correctly pasted the control script below.”

    Other times, it just says the control code was not found. Any ideas on what I can check?


    • Andreas Nurbo
      February 15, 2011 at 22:56 #

      Which version of the plugin are you using? Latest is 11.2.2
      Also are you using Thesis?

      Do you update the page after you have pasted the code in the “tracking” code box on the test page in WordPress?
      Also have you checked Enable GWO on the page?

      I can’t reproduce the error myself so hard to pin point the problem.

  12. Sher
    February 15, 2011 at 23:52 #

    Hi Andreas,

    I’m using version 11.2.2 and the Flexibility 2 theme. I do update after adding the code to the box, and I do have Enable GWO checked. I also tried pasting in the complete code in the Extract box and manually entering the code in the Test id and GWO boxes to see if that would work. After I update, it empties the Test id and GWO id boxes.

    Is there anyplace I could peek at the code after updating it and see what it’s capturing?

    • Andreas Nurbo
      February 16, 2011 at 10:17 #

      I downloaded and tested Flexibility 3 and the values are extracted are saved correctly in that version.
      Problem I got was that I could not get the pages to validate because the Websiteroptimizer validator said it couldn’t find the pages. So there is something wrong with the theme itself most likely. Don’t have time to dive into that at the moment. You could ask the themedeveloper for ideas.

  13. Sher
    February 16, 2011 at 20:28 #

    I’ll do that. Thanks for checking into this. I’ll let you know if we find a solution.

  14. Sher
    February 17, 2011 at 20:48 #

    Hi Andreas,

    Got it! When I looked at my page source, I noticed that a CDATA code was being added to the control and tracking codes. I was running the WP Minify plugin to speed up my page loading. When I deactivated the plugin and re-entered the control and tracking codes, they validated.

    Hope that helps anyone else having this problem. Check your page source and compare it to the code from GWO. If it’s altering the code and adding CDATA, suspect your compression plugins.

    Thanks for your help in solving this.

  15. Anna
    February 24, 2011 at 18:17 #

    Hi there,

    I installed the plugin today per the instructions in this video:

    I installed version 1.3 and I’m using a Genesis theme. The plugin doesn’t have any fields for installing code: instead, I get this error message:

    Warning: call_user_func(Array) []: First argument is expected to be a valid callback in /home/tradaco/public_html/wp-admin/includes/template.php on line 2864

    Any ideas? I can’t seem to get past this point.

    • Andreas Nurbp
      February 24, 2011 at 20:13 #

      That tutorial is for a different plugin. So you need to track down that developer.

  16. Lily
    March 15, 2011 at 07:33 #

    Hi Andreas I have just downloaded V11.2.2 and have installed ok, but can’t get it to validate. I have filled in boxes similar to your screenshot and cut & paste id & gwo acct number both separately and then combined with “/” in between.
    My WP pages will not validate, and if I paste combined code either with or without individual codes the editor will not save any id fields at all. Can you please make some suggestions?

    • Andreas Nurbo
      March 15, 2011 at 18:43 #

      You can paste the combined control & tracking into the the tracking code field and the plugin will extract the necessary information.

      When not saving and validating correctly it probably has something to do with your theme.

  17. Kivi
    April 9, 2011 at 04:39 #

    Hi, Having similar validation problems and not being able to save codes. Saw notes about theme conflict, so I assume that’s it. Using Headway, so any advice there would be appreciated. Thanks!

    • Andreas Nurbo
      May 28, 2011 at 10:56 #

      Don’t have a copy of Headway so don’t know. It could be plugin conflicts as well.

  18. Brecht
    May 13, 2011 at 14:51 #

    I was getting a CDATA error in my code, thought it was my theme, turned out it was a caching plugin that actually had conflicts.

    If you get the CDATA prepend to your code and it’s messing up your validation check your caching plugin.

  19. Aaron
    May 26, 2011 at 18:52 #

    Can you a/b test page names and headlines??

    • Andreas Nurbo
      May 28, 2011 at 10:56 #

      No never added that by default. You could do some work around using JavaScript I think. Requires some fiddling.

  20. Rob Jones
    May 31, 2011 at 18:09 #

    Andreas, I just came across your plugin, and I’m going to use it for several tests. Quick question. If I want to track a link in a widget, can I just add this code to the link?

    onclick=”return ConversionCount(this);”

    Will that track a goal inside and outside of an A/B test? Basically, could I turn any link on my site into a goal by simply adding that little bit of code?

    • Andreas Nurbo
      May 31, 2011 at 21:59 #

      All pages that has the widget needs to have GWO activated on them with the same test id and account id and have uses link as conversion checked. Then it should work I think.

      • Rob Jones
        May 31, 2011 at 22:07 #

        Ok cool thanks. I’ll give it a try and let you know how it works. I know there are plugins to limit widgets to only showing on certain posts, so I could probably use one of those to do tests on specific pages.

  21. Anna
    June 1, 2011 at 12:41 #

    Awesome plagin. After several hours of mortal combat with different settings and other plagins I managed to start my A/B test with GWO. No errors, no problems. Thanks!

  22. Patrick Allmond
    June 10, 2011 at 20:48 #

    Thanks for a great plugin. But I cannot get the part that turns my link into a conversion link to work. THe site is and I put a small text link at the bottom of the page to test it. I highlight it and your icon in the editor makes it self available. I click it to make the hightlighted link a conversion link but nothing happens to the text/HTML in WP. I have the correct radio button set in the options at the bottom of the page.

    What is supposed to happen to a link when I make it a conversion link because nothing is happening to my links.

    Thanks – Patrick

  23. Patrick Allmond
    June 10, 2011 at 21:00 #

    Following up…. it looks like I can just add onclick=”return ConversionCount(this);” to any link that has GWO enabled and it should count the click ?

    • Andreas Nurbp
      June 10, 2011 at 23:01 #

      Yup. That is what clicking the ConversionLink icon does. Adds the ConversionCount function to a link.

  24. Patrick Allmond
    June 10, 2011 at 23:23 #

    Thanks. I’ve got it up and running at For some reasons the button didn’t work for me in Chrome on the Mac or Windows.

  25. Dr Martin Russell
    August 14, 2011 at 14:14 #

    Took me ages to find this, but absolutely brilliant Andreas!

    I’m testing the plugin right now.

    Also, I’m looking for a way to use GWO to test what I put in my sidebar widgets. Any suggestions how I can do that too?

    • Andreas Nurbp
      August 14, 2011 at 18:38 #

      But I think for sidebars that is on all pages my plugin wont work since its page specific.
      You would need to add the GWO code manually to get sitewide testing of sidebars. Or use the plugin.
      Then you add the GWO code to wp_head and wp_footer.
      Test must be multivariate so you get section support.

  26. Troy
    September 13, 2011 at 19:23 #

    Any luck getting your plugin to work while W3 Total Cache is enabled? With the caching enabled the site pages won’t pass validation. With the caching plugin disabled it works.

  27. Tom
    October 3, 2011 at 08:43 #

    Hi Andreas– I wonder if your plugin can help me. What I want to do is test to find the best sidebar banner design to maximize click-thru to a landing page. The code for these banners is contained in a widget (on my WordPress site). This means that I don’t have a different URL for my page variations, as it is just a part of each of the 3,100 posts on my site. I’ve been scratching my head and Googling for solutions, to no avail. Any suggestions?

  28. Geoff
    October 6, 2011 at 03:35 #

    Hi Andreas. Some of the stuff I need to split test is in my CSS files, and so I need the GWO control & tracking script inserted just below the tag, before any of my CSS files are loaded. Is there a way to change the plugin to do this?

    • Andreas Nurbo
      November 19, 2011 at 16:49 #

      Hmm those scripts arent the ones that needs to be moved around. I think you would have to do some manual tinkering and wrap the link tags in the gwo section code.

  29. Agnes
    November 18, 2011 at 15:01 #

    I ve read description of your plugon and don’t exactly understand what is a conversion link here… and thus whether it will work for me.

    I am willing to use GWO with WP on a contact form 7 form.

    Contact Form 7 does not really redirect to a “thank you” page but I am using a method to simulate it for Google Analytics, similar to the one described here:
    It basically pushes a fake page:
    _gaq.push(['_trackPageview', '/mysite/thank-you.html']);

    Now, I want to use a GWO a/b test (my first time) and am looking at the different plusgins, however I wonder if it will be possible using this method, or if I need a “real” thank you page.
    Any clue?

  30. Agnes
    November 18, 2011 at 15:32 #

    PS: I found out I can easily solve the above problem by setting Contact Form 7 to redirect to a thank you page:
    By inserting into its additional settings:
    on_sent_ok: “location = ‘’;”
    Explained here:

  31. Scott Voak
    November 21, 2011 at 22:00 #

    I am also having trouble getting the control to validate. My designers built a custom theme and I am guessing that something in that conflicts with the plug-in. Do you know what I can tell them to look for and change that might help?

    • Andreas Nurbo
      November 28, 2011 at 18:40 #

      They could have missed some action hook. What exactly is the message during the failed validation?

  32. Alex in Paris
    December 8, 2011 at 18:45 #


    I have just installed and tested the plugin with WordPress.

    When I paste the code into the fields and then click update, I find that the tracking script and account boxes are empty!

    Very frustrated, because can’t find a GWO / wordpress plugin that works… :’-(

    Please help! (I’m willing to offer a $100 bounty to who makes A/B testing work for me within WordPress – yes, I’m serious).



    • Andreas Nurbo
      December 15, 2011 at 14:12 #

      Hi Alex
      Apologize for late reply. You don’t give me much information to work with. If you don’t want to publish information in public you can contact my using my support form

  33. Paul Boomer
    December 20, 2011 at 21:50 #

    We love your plugin. It’s made our lives easier. Thank you for dedicating time to the plugin.

    Do you plan to modify the code to allow multiple tests to run with all of them having the same conversion page (similar to

    See for more info.

    Again, thank you!

    • Andreas Nurbo
      December 20, 2011 at 22:00 #

      Haven’t thought about it. But it seems useful and from first think through it does not seem that difficult to add. I’ll squeeze it in.

      • Paul Boomer
        December 22, 2011 at 17:38 #

        Where is your donation button? :)

        If I can help in any way let me know.

  34. Hi, Neat post. There’s a problem along with your website in web explorer, could check this? IE still is the market chief and a huge section of people will leave out your great writing because of this problem.

  35. Jordi
    January 6, 2012 at 05:17 #

    Please, consider changing the following code in configwp.php.

    It shows the GWO meta_box in custom post types

    function gwo_meta_box_add() {
    if ( function_exists( ‘get_post_types’ ) ) {
    $post_types = get_post_types( array(), ‘objects’ );
    foreach ( $post_types as $post_type ) {
    if ( $post_type->show_ui ) {
    add_meta_box(‘gwo’,__(‘GWO’, ‘cs_gwo_plugin’),’gwo_meta’, $post_type->name,’advanced’);
    } else if ( function_exists(‘add_meta_box’) ) {
    add_meta_box(‘gwo’,__(‘GWO’, ‘cs_gwo_plugin’),’gwo_meta’,'post’,'advanced’);
    add_meta_box(‘gwo’,__(‘GWO’, ‘cs_gwo_plugin’),’gwo_meta’,'page’,'advanced’);

    • Andreas Nurbo
      January 25, 2012 at 13:43 #

      Nice idea. Given the various ideas thats been suggested I think I’ll have to add a settings page for the plugin.
      No need to have the metaboxes activated on all CPTs.

  36. AC
    January 17, 2012 at 20:42 #

    Wow, it actually works! I tried 3 other plugins but none worked at all. Thanks!

  37. Patricia
    January 23, 2012 at 20:35 #

    Thank you so VERY much – there was no way, other than doing this strict html, that I could have EVER done this in wp with out this plugin!

    And it’s simple too..

    Thanks EVER so much!!!!

  38. jw
    February 25, 2012 at 04:09 #

    Will this work for conversion tracking of a sale?

    When I insert googles conversion tracking code within my WP page and save the changes (under the html view), everything looks in tact.

    However, when I pull up the page and view the source, for some crazy reason WP appends the code with at the end and a couple funky characters in the middle of the code which causes it to NOT track.

    Will your plugin address this or do you have a fix for my problem?



  39. Joe
    February 27, 2012 at 18:10 #

    Hi – I am attempting to use GWO tracking across multiple subdomains as detailed here:

    In order to make this work, I need to add this to each control and tracking script:

    gaq.push (['gwo.setDomainName', '"']);

    Is there a way to do this using your plugin? Thanks.

  40. Paul Boomer
    May 24, 2012 at 22:08 #

    Can your plugin be used for a site-wide test?

    For instance, we’d like to test a primary call-to-action that’s on every page of the site. We’d like to test variations of the button.

  41. Tomas
    May 25, 2012 at 11:35 #


    I installed the GWO Plugin and want to make a A/B Test with conversion links (not conversion page).

    I configured the GWO settings on the tested page, but I am unable to mark the conversion link. The middle icon is clickable, but nothing happens when I click on it (the link is obviously not being marked as conversion link as the right icon becomes not clickable).

    Can you please help me how to fix it?



  42. news
    May 27, 2012 at 18:26 #

    Wanted to drop a remark and let you know your Feed isnt working today. I tried adding it to my Google reader account but got nothing.

Leave a Reply

Keywords are not a name. If you use keywords for a name you get marked as spam, this goes for writing them in french, german etc.

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Get Adobe Flash player