My company Cryos International has just signed with a new franchisee in Mumbai, India. In order to prepare the new launch we are currently working hard on updating our internal documentation etc.
A part of the updates stuff for was to make sure our web statistics was up to date, which is why I again turned to Google Analytics. I discovered that Google Analytics has made a new javascript implementation which allows it to send statistics updates to multiple Google account. This feature is really cool, cause it will allow us to track statistics on our own and at the same time allow our franchisee’s to have their own Google Analytics account set up.
In the sample below I have set up the ga.js script to send statistics updates to both our tracker and our franchisee’s tracker:
<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 = null;
//Tracker 1
pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._initData();
pageTracker._trackPageview();
//Tracker 2
pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._initData();
pageTracker._trackPageview();
</script>
Notice how I just reinitalize the pageTracker object and calls the same methods over again.
All in this means that I can track all our sites in our global Google Analytics account:
- Cryos International
- Cryos International - Denmark
- Cryos International - New York
- Cryos International - India
So thank you Google for providing a very nice statistics tool