Reputation: 42063
I have various subdomains and am using different google analytics profiles to track each one. However, I have come to the scenario where I would like to log pageviews from one subdomain to a different subdomain so they will show up together in a specific profile. Can _setDomainName be used this way (to log to a different domain than the actual one a user is on?) If so can you provide an example?
Upvotes: 0
Views: 68
Reputation: 22832
No. That's not how _setDomainName works. _setDomainName is used when storing the first party cookies Google Analytics uses. It MUST follow the same rules for domains used when setting cookies.
Read Wiki's HTTP Cookie's Attribute Section
or RFC2965
There are official docs with instructions to implement GA on several domains.
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite
Upvotes: 1