Platform
Custom CNAME
First-party subdomain setup, DNS records, SSL, and migration from t.trackrift.com.
By default the Universal Script loads from t.trackrift.com and sends events to api.trackrift.com. Ad blockers and Intelligent Tracking Prevention (Safari) may treat these as third-party. A custom CNAME serves both script and collector from t.yourbrand.com — first-party to your domain.
When to use a CNAME
| Scenario | Impact without CNAME | With CNAME |
|---|---|---|
| Ad blockers (uBlock, Brave) | Script/collect blocked | Often allowed as first-party |
| Safari ITP | Shorter cookie lifetime on tracker domain | Cookies scoped to your subdomain |
| Meta match quality | Weaker fbp persistence | Improved when pixel + collector share site |
| Enterprise security review | Third-party domain flagged | Subdomain under your DNS control |
Setup steps
- Dashboard → Settings → Tracking → Custom domain.
- Choose subdomain (common:
t.,track.,analytics.). - Create DNS CNAME:
t.yourdomain.com→ target shown in dashboard (e.g.collect.trackrift.com). - Do not proxy through Cloudflare orange-cloud initially — use DNS-only until verified.
- Wait for propagation (TTL dependent — 5 min to 48h).
- Click Check DNS now — status must show Verified.
- Copy updated Universal Script snippet and replace on all properties.
- Add marketing origins to allowlist if restricted.
<script async src="https://api.trackrift.com/v1/u.js?id=YOUR_PUBLIC_ID"></script>DNS examples
| Provider | Record type | Name | Value |
|---|---|---|---|
| Cloudflare | CNAME | t | collect.trackrift.com (DNS only) |
| Route 53 | CNAME | t.yourdomain.com | collect.trackrift.com |
| GoDaddy | CNAME | t | collect.trackrift.com |
Allowed origins
After switching CNAME, add https://yourdomain.com to Settings → Tracking → Allowed origins. The collector validates Origin header against this list when configured.
Partial migration
Running old (t.trackrift.com) and new (CNAME) snippets simultaneously splits anonymous_id across two cookie domains — avoid. Deploy CNAME snippet everywhere in one release window.