Track visitors across different domains
Track one visitor journey across different root domains, such as a marketing site and an app, with additional domains.
Track visitors as they move between different root domains, such as example.com and myapp.io, as one journey.
Subdomains need nothing:
app.example.comandblog.example.comare already part ofexample.com, and the cookie script shares its visitor across them.
When to use it
- A marketing site on
example.comand the app onmyapp.io - A store on its own domain next to your main site
- Several brand domains that share customers
Set it up
- In your site's Settings → Additional domains, add the other domains (for example
myapp.io). Events from them are accepted from then on. - Install the script on every domain with the same site ID, and list the other domains in
data-allowed-hostnames:
<script
defer
data-website-id="YOUR_SITE_ID"
data-allowed-hostnames="myapp.io"
src="https://usedatasense.com/js/script.cookies.js"
></script>data-allowed-hostnames is a comma-separated list of your other domains, without the one the page is on.
How it works
When a visitor clicks a link to one of those domains, the script adds _ds_vid and _ds_sid to the link, and the script on the other side continues the same visitor and session, then removes the parameters from the address bar.
Allow all domains
Allow all domains accepts events from any domain. Use it for embedded widgets or customer-owned domains you can't list in advance.