sthg
sthg

Reputation: 1135

Google analytics not gathering data from .asp page

I've installed Google Analytics several times in the past without trouble. However, recently i've installed GA on a .asp page for the first time. Google Analytics dashboard tells me the tag is properly installed, but ever after several days, i can't see any data.


alt text http://img704.imageshack.us/img704/4584/tracking1.jpg


alt text http://img340.imageshack.us/img340/8272/tracking2.jpg


Is there any special setup required for .asp pages or windows servers?

Unfortunately, I don't have the option to install GAHelper.

Upvotes: 0

Views: 1079

Answers (2)

sthg
sthg

Reputation: 1135

Finally got this working by using Google Analytics Asynchronous Tracking, using the following code:

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-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';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();

</script>

Never quite understood why this didn't work with the usual google tracking code...

Upvotes: 1

Matti Virkkunen
Matti Virkkunen

Reputation: 65116

ASP pages should not require any special configuration. You can check if the tracking code is being outputted correctly by using View Source in your browser, that's all it takes from the server.

The next step would be using Firebug or a similar tool to see if the request to the Analytics servers is going through properly.

Upvotes: 1

Related Questions