- Joined
- Feb 17, 2002
- Messages
- 14,663
- Reaction score
- 105
Was hoping someone might have some input on this:
I just installed tracking code for Google Analytics that is supposed to track clicks on the mini and bigger banners and report them for our affiliates. However, the script uses the following to forward the user:
http://www.google.com/support/google...n&answer=55527
Code:
Which makes the browser disregard the "target=_blank" that usually opens the link in a new tab/window.
Could I just have it return somehow after the 100ms instead of the document.location forwarding? Google says the 100ms delay is necessary so that the code has time to load before the user clicks on it. I'm pitiful in javascript and no amount of searching has found me an answer so far.
Thanks.
I just installed tracking code for Google Analytics that is supposed to track clicks on the mini and bigger banners and report them for our affiliates. However, the script uses the following to forward the user:
http://www.google.com/support/google...n&answer=55527
Code:
<script type="text/javascript">
function recordOutboundLink(link, category, action) {
try {
var pageTracker=_gat._getTracker("UA-1238980-1");
pageTracker._trackEvent(category, action);
setTimeout('document.location = "' + link.href + '"', 100)
}catch(err){}
}
</script>
function recordOutboundLink(link, category, action) {
try {
var pageTracker=_gat._getTracker("UA-1238980-1");
pageTracker._trackEvent(category, action);
setTimeout('document.location = "' + link.href + '"', 100)
}catch(err){}
}
</script>
Which makes the browser disregard the "target=_blank" that usually opens the link in a new tab/window.
Could I just have it return somehow after the 100ms instead of the document.location forwarding? Google says the 100ms delay is necessary so that the code has time to load before the user clicks on it. I'm pitiful in javascript and no amount of searching has found me an answer so far.
Thanks.