views:

45

answers:

2

I've created a simple Google analytics test site that has events (on the buttons) and log visits upon entering the page. The status in the Google analytics report site is set to "Receiving Data".

Why is the visits counter on the Google analytics report site stays on 0?

Here is the site's source code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>

    <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">
        var pageTracker = _gat._getTracker("UA-12158271-3");
        pageTracker._trackPageview('/TestGA.html');
    </script>

</head>
<body>
    <div>
        Click the buttons to test GA...</div>
    <input type="button" value="clickA" onclick="pageTracker._trackPageview('/TestGA.html/a');" />
    <input type="button" value="clickB" onclick="pageTracker._trackPageview('/TestGA.html/b');" />
    <input type="button" value="clickC" onclick="pageTracker._trackPageview('/TestGA.html/c');" />
</body>
</html>
A: 

Because Google Analytics goes to some lengths to make sure your own visits aren't counted. Find someone else to visit the site.

Aaron Digulla
Can I fake other person's visit by using Firefox's Private Browsing mode?
Eran Betzalel
You will have to give it a try. Or you can open a question in GA's support group.
Aaron Digulla
I've waited the recommended 24 hours and it worked.
Eran Betzalel
A: 

move your tracker at the end of the page for performance issues

Ozan BAYRAM