I use GA's trackEvent to record user's click event on search autoplete of my site. When user click on item of autoplete, I record two event, and then page redirect to the result page. But the problem is: the amount of the two action "click" and "view" is not equal, the amount of "click" > the amount of "view". I see the two request are sent in firebug, but they are both canceled because the page redirect. Even though they are canceled, I can see the result in GA.I just can't understand why they are not equal? The later one failed sometimes?
Here is the code part:
//trackEvent just use _gaq.push("trackEvent", xxx)
trackEvent("search", "click");
trackEvent("search", "view");
window.location.href = des;
I use GA's trackEvent to record user's click event on search autoplete of my site. When user click on item of autoplete, I record two event, and then page redirect to the result page. But the problem is: the amount of the two action "click" and "view" is not equal, the amount of "click" > the amount of "view". I see the two request are sent in firebug, but they are both canceled because the page redirect. Even though they are canceled, I can see the result in GA.I just can't understand why they are not equal? The later one failed sometimes?
Here is the code part:
//trackEvent just use _gaq.push("trackEvent", xxx)
trackEvent("search", "click");
trackEvent("search", "view");
window.location.href = des;
Share
Improve this question
asked Aug 20, 2012 at 6:20
user1610957user1610957
1011 silver badge4 bronze badges
1 Answer
Reset to default 7Here's the answer to your question:
Google Analytics - Setting the Hit Callback