Using Google Analytics to asynchronously track page views
First, you'll need to define the _gaq
variable and load in the analytics script from googles server. After that, you should be able to call the 'push' method.
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
// tracks hit for /some/page/
_gaq.push(['_trackPageview', '/some/page']);
Be sure to substitute 'UA-XXXXXXX-X'
with your account ID.
After that's done, load up the page in your browser, open up the console, and look in the network tab. Try loading a few pages to verify that it's asynchronously pushing data to googles servers.
Google uses a .gif image for tracking, so you might try filtering by image and to find request for a file called __utm.gif
If you're using Google Chrome and still having trouble finding it, you might try the tag debugger plugin by ObservePoint or the Official Tag assistant plugin by Google