Google Optimizer & Analytics Tracking Clicks

1 replies
For a while I've been using Google Analytics to track clicks on my affiliate links using the pageTracker_trackPageView code on my links. Recently I have started to use Google Optimizer which also tracks clicks as conversion. For that I have this function:

function doGoal(that) {
try {
var gwoTracker=_gat._getTracker("UA-xxxxxxxx-x");
gwoTracker._trackPageview("/yyyyyyyyyy/goal");
setTimeout('document.location = "' + that.href + '"', 100)
}

And then call doGoal on the onclick event for the link. The problem is that I can't seem to get both types of tracking to work at the same time. I tried adding pageTracker_TrackPageview call for Analytics to the doGoal function (right after the gwoTracker call) but nothing happened when I clicked on my links after I did that.

Does anyone know how I can get both types of tracking on the same link?
#analytics #clicks #google #optimizer #tracking
  • Profile picture of the author jaimegm
    My suggestion is to use AJAX, to call one and forget it, and then go to the other it should work
    {{ DiscussionBoard.errors[2499392].message }}

Trending Topics