Categories: Discuss Tracking and Implementation issues :

ga.js loaded, trackPageView called, but GIF request is not sent

Showing 1-2 of 2 messages
ga.js loaded, trackPageView called, but GIF request is not sent petoria 2/1/09 2:12 AM
Dear Google Support and Forum Users,
I have copyandpasted the tracking code into our pages right before the closing body tag, as advised.
The file ga.js is requested, loaded and executed alright, however the 2nd request (the GIF request that actually does the tracking) is not sent (checked with firebug). Does anybody know how this can happen?
Tried alerting from the catch block, it is not fired.
I also tried stepping into the _trackPageView() with the JS debugger, so I know the method is called, but of course it is not possible to figure out what is going wrong in the obfuscated code.
The error console does not display any errors.

Here are the last lines of all pages (can't give you a URL, because currently the code is only installed on our pw protected test server):
[of course, there is the correct ID in the code instead of the ###]
----------- snip -----------
<!-- start google analytics -->
<script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("##-######-#");
    pageTracker._trackPageview();
    } catch(err) {}
</script>
<!-- end google analytics -->
</body>
</html>
----------- snip -----------

I even tried this within a blank html page locally, same problem, just the ga.js requested. So it also cannot be any conflict with other scripts...

Any ideas?

Thanks a lot in advance.
Petoria2009-02-02

-------

Additional info: I can exclude a problem with my browser, since I can see the GIF request going out when visiting other sites using GA.

Below is the simplest possible test page with zero conflict potential, but the problem occurs even with this one... Can there anything wrong in these few lines?

I'd be happy for any hints... Thanks a lot

------- snip -------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
   <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("##-######-#");
pageTracker._trackPageview();
} catch(err) {}</script>

  </body>
</html>

------- snip -------

Re: ga.js loaded, trackPageView called, but GIF request is not sent AnalyticsPro.Diana 2/9/09 8:53 AM
Petoria,

The tracking code is correct. Did you try waiting for at least 24 hours after installing the tracking code? Your account should have already started reporting data.