Okay so I've created a rails app to which I've added the google analytics tracking code. The problem is that the google analytics page is saying the tracking code is not installed. Here is the tracking code. Note I'm using a heroku domain ()
<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','//www.google-analytics/analytics.js','ga');
ga('create', 'UA-XXXXXXXX-X', 'herokuapp');
ga('send', 'pageview');
</script>
I almost sure I'm missing something simple here, something related to the domain name or the heroku setup, but I've been at this for a while and my previous investigations on this problem have led to no result, so I'm hoping someone can help me out, thanks in advance!
Okay so I've created a rails app to which I've added the google analytics tracking code. The problem is that the google analytics page is saying the tracking code is not installed. Here is the tracking code. Note I'm using a heroku domain (https://ligabox.herokuapp.)
<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','//www.google-analytics./analytics.js','ga');
ga('create', 'UA-XXXXXXXX-X', 'herokuapp.');
ga('send', 'pageview');
</script>
I almost sure I'm missing something simple here, something related to the domain name or the heroku setup, but I've been at this for a while and my previous investigations on this problem have led to no result, so I'm hoping someone can help me out, thanks in advance!
Share Improve this question edited May 30, 2013 at 7:19 j0k 22.8k28 gold badges81 silver badges90 bronze badges asked May 30, 2013 at 1:59 user1549913user1549913 671 silver badge10 bronze badges 3-
1
How much have you waited? Detection takes more time, even when Google tells you:
Last updated: some date
in Analytics status, I had to wait some more time having installed code beforesome date
. – sites Commented May 30, 2013 at 4:37 - Just check have you added this config "heroku config:add GOOGLE_ANALYTICS_ID=UA-XXXXXXXX-X" – Arihant Godha Commented May 30, 2013 at 7:24
- @ArihantGodha it seems to be working fine now, although I haven't added that config, is it necessary?, what would this actually do? (I'm a noob in rails and heroku) thanks! – user1549913 Commented May 30, 2013 at 20:30
1 Answer
Reset to default 9If you look in the network tab of most browsers you'll be able to see the requests that your site is sending to Google so it's just a case of waiting until your data starts appearing - here's what I see loading your site. Also you can use the new 'live' views in Google Analytics just to be sure.