Use Your Own Domain
Upgrade to fully first-party tracking on a subdomain of your own domain by adding two DNS records. Non-disruptive — your current URL keeps working during the switch.
The Pixel Logic URL (Quick Start) works great,
but running on your own domain makes the whole setup fully first-party: requests and
cookies live on your brand (e.g. metrics.yourdomain.com), which is the strongest, most
durable form of server-side tracking.
This is a non-disruptive upgrade. Your existing Pixel Logic URL keeps working the whole time DNS propagates — nothing breaks, and you can switch back at any point.
Step 1 — Start the switch
- Open your container page in the dashboard.
- In the Configure GTM section, find Switch to my own domain.
- Enter:
- Your domain (e.g.
yourdomain.com) - Your tracking subdomain — the label that goes in front of your domain
(e.g.
metrics→metrics.yourdomain.com). Type your own, or click Generate for a random one. Tip: avoid obvious words likeanalytics,track,gtm, orpixel— a neutral or random subdomain is less likely to be flagged by ad blockers. - Your Web GTM Container ID (e.g.
GTM-XXXXXXX)
- Your domain (e.g.
- Submit. The dashboard now shows you the exact two DNS records to add.
Step 2 — Add the two DNS records
Add these as CNAME records in your DNS provider. The dashboard shows the exact host
and target for your account — copy each with the Copy buttons. If your chosen subdomain
is metrics, they'll look like this:
| Type | Host | Value | Proxy |
|---|---|---|---|
| CNAME | metrics.yourdomain.com |
(shown in your dashboard) | OFF |
| CNAME | load-metrics.yourdomain.com |
(shown in your dashboard) | OFF |
Important — proxy must be OFF. If you use Cloudflare, set both records to DNS only (grey cloud, not orange). The orange "proxied" cloud breaks a connection that Google Tag Manager's testing tools rely on.
DNS changes can take anywhere from a few minutes to a couple of hours to propagate.
Step 3 — Automatic verification
You don't need to click anything. Pixel Logic checks your DNS every few minutes. Once both records resolve, your container:
- Issues a secure HTTPS certificate for your subdomain automatically.
- Switches your Server URL to
https://metrics.yourdomain.com(your chosen subdomain). - Returns to Active as a first-party server.
You'll see the new URL on your container page.
Step 4 — Update your GTM to the new URL
Now point both sides at your new first-party URL (same fields as the Quick Start, new value):
- Server container → Admin → Container Settings → Tagging Server URL → your new Server URL → Save & Publish.
- Web side (GA4 Google tag) →
server_container_url→ your new Server URL → Publish.
See Connect GA4 for details.
Why first-party is better
- Longer cookie life in practice. On your own domain, server-set cookies aren't subject to the cross-site heuristics that can shorten them — so the ~400-day lifetime holds up across more browsers.
- Requests on your brand. Tracking calls go to your own subdomain, not a shared host.
Switching back
Reverting to the Pixel Logic URL is always available and never destructive — just paste the Pixel Logic URL back into your GA4 tag and server container settings. Your first-party records can stay in place; both addresses keep working.
Want even stronger ad-blocker resistance? See Enhanced Ad Blocker Protection.