First-party tracker domain
By default the SDK is served from cdn.journeylayer.com and events are collected
at collect.journeylayer.com. You can instead serve both from a subdomain of
your own site — a first‑party tracker domain like track.yourdomain.com.
Why use it
- Dodges ad‑blockers and tracking protection. Requests to your own subdomain are far less likely to be blocked than requests to a third‑party analytics host.
- First‑party cookies & context. The whole pipeline runs under your domain.
How it works
You point a subdomain at JourneyLayer with a CNAME record. JourneyLayer serves the SDK and receives events on that host, and the SDK auto‑detects the endpoint from its own script URL — so once the CNAME is verified, both the script and the events are first‑party.
Set it up
-
In the dashboard go to Settings → SDK / Install → First‑party tracker domain.
-
Enter the subdomain you want to use, e.g.
track.yourdomain.com. -
Add the CNAME record it shows you at your DNS provider.
-
Click Verify. Once verified, the install snippet switches to your host:
<script src="https://track.yourdomain.com/p/<PROJECT_PUBLIC_ID>/jl-script.js" async></script>
Until the domain is verified, the snippet safely falls back to the shared
cdn.journeylayer.com host so your site never breaks mid‑setup.
Tracker domain vs. allowed domains
These are two different settings — don't confuse them:
| Setting | What it is |
|---|---|
| First‑party tracker domain | The host that serves the SDK and receives events (one per project). |
| Allowed website domains | The page origins allowed to send events with your token. |
The tracker domain is where the script lives; allowed domains are which websites may use it.