Google Website Optimizer Cross-Domain Tracking - Outbound Link Doesn't Work

221 views Asked by At

I'm trying to get google website optimizer (gwo) cross-domain tracking working with the asynchronous code described here: http://www.google.com/support/websiteoptimizer/bin/answer.py?hl=en&answer=151978

My outbound link looks like this:

<a href="http://secure.ultracart.com" onclick="_gaq.push(['_link', 'http://secure.ultracart.com']); return false;">link</a>

But when I click on that outbound link, it doesn't go to the other website. It works if I remove the return false;, but that stops the gwo conversion from registering.

I thought it might be a javascript conflict, so I made this simple test file, and it still doesn't work: http://www.smilinggardener.com/files/test.php

Is there someone here familiar with gwo who knows what the problem might be? If you look at the page source of my test.php, I think the code is perfect. Thanks very much for any advice you can give me.

Phil

1

There are 1 answers

0
Ben Alvord On

You need to change the onclick event to:

onclick="_gaq.push(['**gwo.**_link', 'http://secure.ultracart.com']); return false;"

Google's documentation for the cross domain GWO tests is really terrible. You need to add the 'gwo.' to the '_link' method because that's how the variables are set in the GWO tracking scripts. Google's actually documentation on this does not show the 'gwo.', which is nice.