I wish to use event tracking to record clicks on a specific type of link to another website. I am using jQuery, and the code I currently have is:
$(\'a.websi
hitCallback
You can set a custom callback on the tracker object by using:
_gaq.push(['_set', 'hitCallback', function(){}]);
I described the code for it a little more in-depth here: Track event in Google Analytics upon clicking form submit
How about solution from this answer?
// Log a pageview to GA for a conversion
_gaq.push(['_trackPageview', url]);
// Push the redirect to make sure it happens AFTER we track the pageview
_gaq.push(function() { document.location = url; });
I've faced similar issue with the external link tracking. My salvation was using OnMouseDown
event instead of OnClick
.