CNAME subdomain
When you cannot run any code in front of your site, a subdomain of your own domain can point at the
3x API. Requests then go to https://t.example.com/v1/e – same site as your pages.
Setup
- Ask the operator of your 3x deployment for the CNAME target and to add
t.example.comas a custom domain of the API (self-hosted on Vercel: Project → Settings → Domains of the API project; TLS is issued automatically). - Create the DNS record:
t.example.com. 3600 IN CNAME api.3x.example.Use the host name of your API origin ({{API_ORIGIN}} without https://) as the target.
- Point the snippet at it:
<script async src="https://t.example.com/v1/s/x3.full.js?k={{PUBLISHABLE_KEY}}" data-key="{{PUBLISHABLE_KEY}}" data-host="https://t.example.com"></script>Verify
curl -s -o /dev/null -w "%{http_code}\n" https://t.example.com/v1/healthPrints 200. The network tab shows POST https://t.example.com/v1/e → 204.
Limits
- Visitor IPs are exact – the browser connects to the API directly, no proxy key needed.
- Ad blockers: most block lists match host names and paths; a neutral subdomain is usually not listed. Some blockers (uBlock Origin on Firefox) resolve CNAMEs and can still block it, so a path proxy is stronger.
- Cookies: the browser sends cookies scoped to
.example.comtot.example.com. 3x ignores them and never sets any, but if your site sets wide-scoped cookies, prefer a path proxy that strips them. connect-srcandscript-srcneedhttps://t.example.comin your CSP.