Welcome to WebmasterWorld Guest from

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Updated cross/sub domain tracking codes in GA

_setAllowHash() method has been deprecated



1:32 am on Sep 11, 2011 (gmt 0)

5+ Year Member

Google seems to have finally updated its documentation for sub-domain & cross-domain tracking. [code.google.com ]

The _setAllowHash() object method has been deprecated [code.google.com ].This method reduces the domain hash value to an arbitrary number (usually ‘1’) so that cookies from other tracked domains do not get rejected. It was never required for sub-domain tracking to work; but Google’s earlier documentation had, quite redundantly, included this.

Another change is that the leading period in the _setDomainName() method has been removed i.e. the preferred method to define the domain name is

_gaq.push(['_setDomainName', 'example-petstore.com']);


_gaq.push(['_setDomainName', '.example-petstore.com']);

Not sure why this change has been brought into the picture.

In any case, I don't think it would be wise to go ahead & change the current tracking codes according to the newly introduced revisions in the documentation. It could screw up the returning visitors metric.


6:35 am on Oct 12, 2011 (gmt 0)

5+ Year Member

Hmmm, on this page:
[code.google.com ]

Under the section entitled:
Tracking Across a Domain and Its Subdomains

I still see the following example using the period before the domain name such as:
_gaq.push(['_setDomainName', '.example-petstore.com']);

So it appears it's still used in some instances.

Featured Threads

Hot Threads This Week

Hot Threads This Month