Evolution Vault logo

[ HOME | COMPANY | PROJECTS | PRESS ]   
F.A.Q.  - Contact   


[ Flash Games | Try Games | Free Games | Countdowns | Software | Wallpapers | Jokes | Babes | Forum | Links ]   

                  

Problem with Google's new Tracking Code


How do I add tracking code to my website? (Official Google Web site)

Copy and paste the code segment into the bottom of your content, immediately before the
tag of each page you are planning to track. If you use a common include or template,
you can enter it there. (Wrong official new Google tracking code)

<script type=”text/javascript”>
var gaJsHost = (("https:" == document.location.protocol) ? " https://ssl." : "http://www.");
document.write("\<script src='" + gaJsHost + " google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );

var pageTracker = _gat._getTracker(“UA-xxxxxx-x”);
pageTracker._initData();
pageTracker._trackVisit();
</script>

You'll need to update the "xxxx-x" in the sample above with your own Google Analytics
account number. (But this code will not work because there is a problem with new Google tracking code)

Galactic Dream Rage of War Demo

Why isn't the new tracking code working?

There is a problem with Google new tracking code! When you try putting up the new tracking code for RageOfWar.net for example, it will create some wrong path to the ga.js!
You are copying the code right, then what could be the issue here?

Google messed up the ga.js installation instructions, you will need to cut out all the HTTP/HTTPS auto-detection including the document.write and just use the version you need.


Also pageTracker._trackVisit(); is incorectly used in documentation. You need to use pageTracker._trackPageview();

And “UA-xxxxxx-x” are using invalid characters and they need to be changet to "UA-xxxxxx-x"
(Problem with new Google tracking code)

For HTTP:
<script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXX-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

For HTTPS:
<script type="text/javascript" src="https://ssl.google-analytics.com/ga.js"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXX-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

--





-[ Back to Top ]-







© Copyright 2005-08 Evolution Vault, SRL.
All rights reserved.
[ Contact Us ]