I recently set up AB tests on some Drupal sites using the Multivariate Module. This works for setting up the different AB test pages (varients), and tracking their conversions through to a certain page.
A couple of the tests weren't typical AB tests though, and instead of tracking a singular conversion goal each varient linked to it's own conversion page. For example one banner varient linked to a 'Buy Now' page and the other varient to a 'Free Demo' page. Not ideal for AB testing purposes, but that's a different topic.
The AB test module tracks the amount of visits to each varient, but in order to track the banner click conversions I used Google Analytics Event Tracking. This requires add something like the below to your links:
onClick="_gaq.push(['_trackEvent', 'AB Testing', 'Homepage - banner conversion test', 'Banner A']);"
In this instance I found the simplest way to apply the event tracking code to the link was using this jQuery click function:
$('div.yourLinkClass a').bind('click', function() { _gaq.push(['_trackEvent', 'AB Testing', 'Homepage - banner conversion test', 'Banner A']); });
Comments
The best
This was useful...
Good work
Thanks for the help.
Add new comment