Google Analytics beacon sent but Analytics shows nothing

Viewed 650

I installed Google Analytics (UA) and added tracking code to a html page. I ran html page from the browser file:///C:/test.html and debugged using google debugger, it ran successfully and shows sent beacon - but Analytics does not show the numbers. I waited for a day but still does not work.

**It works fine if I place the file in c:\Inetpub\wwwwroot and run as http://localhost/test.html -------------------Code in test.html page-------

  <script>
      (function(i,s,o,g,r,a,m)
      {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
              m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
      ga('create', 'UA-******-*', 'auto',{'storage': 'none'});
      ga('set', 'checkProtocolTask', null);
      ga('send', 'pageview');
  </script>

Can anyone tell me if google analytics works in my case.

1 Answers
Related