: Google Analytics lets you manually insert a hit to a URL of your choice with this syntax: (It's intended for tracking links within AJAX applications like GMail) _gaq.push(['_trackPageview', URL]);
Google Analytics lets you manually insert a hit to a URL of your choice with this syntax: (It's intended for tracking links within AJAX applications like GMail)
_gaq.push(['_trackPageview', URL]);
My advice would be to do something like this:
function redirect(url) {
_gaq.push(['_trackPageview', '/outbound/'+url]);
window.location.replace(url);
}
if (country=='IT') {
redirect('http://www.externallink.it/?affiliate=252342');
}
if (country=='ES') {
redirect('http://www.externallink.es/?affiliate=252343');
}
if (country=='FR') {
redirect('http://www.externallink.fr/?affiliate=252344');
}
else {
redirect('http://www.externallink.com/?affiliate=252346');
}
It's actually how outbound link tracking is done in several Analytics integration plugins I've run across.
More posts by @Gonzalez347
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.