First of all: it's not the same as similiar, but without www prefix problem.
I have a website example.com (once again, no "www." prefix). I'd like to serve static content from subdomain static.example.com but Google Analytics keeps to send cookies from static subdomain.
I used a simple CNAME to make subdomain, and here's the Analytics snippet code:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXX-XX']);
_gaq.push(['_setDomainName', 'none']);
_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';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
I tried setting _setDomainName
to example.com
and none
as above but it doesn't work. I also made a new static subdomain (static2.example.com etc) on each time but it didn't work also.
Thanks in advance.