Sub-Domain tracking
The set up when tracking sub-domains is a little different to tracking unique domains.
While the process looks the same, slight alterations need to be made in your woopra.config()
to achieve the desired results.
To track all sub-domains associated with your domain and store this data within a single project, you can do that by adding the cookie_domain
property to your woopra.config()
.
As you can see from the code snippet below, your domain property value remains the same, but you will need to pass in the cookie_domain property in addition to your project name. This value is your Woopra projects name with a period in front of that value.
woopra.config({
domain: 'primary-domain.com',
cookie_domain: '.primary-domain.com'
});
For example, if your Woopra project name is google.com, your cookie_domain
value will be '.google.com'
.
Unlike other methods of cross-domain tracking, with Sub-Domain Tracking, you do not need to add these domains individually to your Woopra configuration, Woopra will do this automatically.
Updated over 4 years ago