Ok first of all, i have the “new” code, the one that is put just before the </head> tag
<script type='text/javascript'>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-#*$!#*$!xx-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);
})();
</script>
The application that uses this code has 5 pages.
I have put this code in 3 of them (the first 2 and the last one).
The last page send me an email about what the visitor wants from our site(a form filled by him actually).
In the last 5 days i received 5 such emails/requests.
But google analytics only show 1 visit in that page.
Any reason as to why? I dont know how accurate google is for the first two pages, but i know for sure how much trafic/vistis my exit/thank you/email page has.
So, what’s wrong and what should i check?
Or it’s just a google glitch?
EDIT:
finally it works. Ignore google’s new code. Stick to old code at end of page, before the </body>.
Google Analytics (GA) can fail to get an accurate count for any number of reasons:
If you want truly accurate visitor information, you need to look at your web server(s) logs, and even then you won’t always get it due to caching (local, proxy, etc).
Try this
<body>and one just before</body>.This will give you a good idea of what is going on with your pages and whether people are even loading each one in its entirety.
1 I’ve actually witnessed this on more than one occasion.