Mobile app version of vmapp.org
Login or Join
Martha676

: First, make sure to add the Google Analytics tracking code (you can find it in your account). Then, use the _trackPageview or _trackEvent function to track the redirect. function trackRedirect(id,

@Martha676

First, make sure to add the Google Analytics tracking code (you can find it in your account).

Then, use the _trackPageview or _trackEvent function to track the redirect.

function trackRedirect(id, target) {
_gaq.push(['_trackPageview', '/out/' + id]);
window.location.replace(target);
}

if (country == 'IT') {
trackRedirect('252342', 'http://www.externallink.it/?affiliate=252342');
} else if (country == 'ES') {
trackRedirect('252343', 'http://www.externallink.es/?affiliate=252343');
} else if (country == 'FR') {
trackRedirect('252344', 'http://www.externallink.fr/?affiliate=252344');
} else {
trackRedirect('252346', 'http://www.externallink.com/?affiliate=252346');
}

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Martha676

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme