Jump to Navigation

how to track across (sub) domains

No replies
Anonymous

If your site contains sub-domains and you want to track visitors across the different sub-domains then you need to register the top level domain (tld) name in Opentracker.
For example widgets.com is the TLD for http://www.widgets.com and plastic.widgets.com
So if you want to track across your sub-domains;
1. register widgets.com in Opentracker
2. modify the script as per below
3. place the modified script in the source? code of your pages
Normally the first segment of script registered for the site "widgets.com" looks like this:
 

<!---------------- OPENTRACKER HTML START ----------------->

<script defer src="http://server1.opentracker.net/?site=www.widgets.com"></script>

<!---------------- OPENTRACKER HTML END ----------------->

 

This needs to be modified to:
 

<!---------------- OPENTRACKER HTML START ----------------->

<script defer src="http://server1.opentracker.net/?site=.widgets.com"></script>

<!---------------- OPENTRACKER HTML END ----------------->

 
NOTE: the only change is the addition of the "." before the domain name.
This tells the cookie to attach itself to all sub-domains instead of just the single domain.