http_request.onreadystatechange = sendAlert;
http_request.open(’GET’, url, true);
http_request.send(null);
}
function sendAlert() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
alert(http_request.responseText);
pageTracker._trackPageview("/pagefilename1" ); }
else {
alert(’Error.’);
}
}
}
An important usage tip about this feature is that, Google Analytics codes are normally installed just before the /body tag. When calling _trackPageview function, you’ll need to use it after the Analytics codes are included. Which means installing the Analytics codes just after the tag is a guaranteed solution.
No comments:
Post a Comment
Tell me what you think