If you are having problems with Google Analytics creating a cookie for each domain, including your subdomains. Here is my solution that I posted elsewhere on this subject.
According to golly, I think I found a workaround for broken code provided by Google.
If you go to GA and get a non-asynchronous code and select:
One domain with multiple subdomains Examples: apps.konoro.org store.konoro.org video.konoro.org
You will see that it gives you sample code from .konoro.org . Change this to www.konoro.org and all cookies will have: .www.konoro.org (with a dot in front of them). A.
Now, if you go back to your Async code, there is only one difference from Async. You need to put ['_setDomainName', 'www.konoro.org'] as the second option, and not after ['_trackPageview'] .
For some reason, since this is the second option, it works great.
My last code is:
var _gaq = _gaq || []; _gaq.push( ['_setAccount', 'UA-XXXXXXX-1'], ['_setDomainName', 'www.konoro.org'], ['_trackPageview'] ); (function() { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.setAttribute('async', 'true'); document.documentElement.firstChild.appendChild(ga); })();
source share