the domain name in _udn should be with dot in front or not? Examples: _udn = ".site.com" _udn = "site.com"
Thanks guys!
the domain name in _udn should be with dot in front or not? Examples: _udn = ".site.com" _udn = "site.com"
Thanks guys!
If you want it to include subdomains, then, yes, with a dot.
e.g.
_udn="site.com" will not register analytics from www.site.com
_udn=".site.com" will
Both work, with limitations on 'work' - the no-dot works well for single-level subdomains, but sometimes gets confused by multiple levels of subdomain. The dot version works well for all subdomains, but changes the way the cookies are matched, and then all existing cookies will be ignored - so all existing users will be treated as new users.
Extra for experts:
The no-dot version gets a dot added when being used as the domain value for the cookies, so it does match www.site.com
By default, the 'www.' is stripped from the domain, so site.com & www.site.com are treated equally.
The cookie value starts with a hash of the domain name (but strips off the leading 'www.'). The _udn var (and _setDomainName function) provides an alternative input value for the hash, which is why the user IDs are changed. This domain-name hash can be disabled if required.
In any case you should check your changes - easiest is with Firebug's Net panel, or a proxy like Charles.