Cross-domain tracking
Keep one visitor across your marketing site, app and checkout on different domains.
Use this when one customer journey spans several domains, for example a marketing site on example.com and checkout on example-checkout.com. Subdomains of your main domain (like app.example.com) need no setup: the cookies already cover them.
Set it up
- 1
Use the same website (same
data-website-id) on every domain. - 2
In Settings → General → Additional domains, add each extra domain so Trakily accepts its events.
- 3
On every domain, list the other domains in
data-allowed-hostnames:On example.com <script defer data-website-id="pls_…" data-domain="example.com" data-allowed-hostnames="example-checkout.com" src="https://trakily.com/js/script.js" ></script>
How it works
When a visitor clicks a link to one of the allowed domains, the script adds four parameters to that link: _pl_vid, _pl_sid, _pl_vfs and _pl_vsn (visitor id, session id, first-seen time and visit count). The script on the destination adopts those ids into its own cookies and removes the parameters from the address bar straight away.
- Only clicks on regular
<a href>links carry the ids. Form posts and redirects from JavaScript don't. - Cookieless mode never links visitors across domains.