A store owner messaged me last month: “I set up server-side tracking, but my Meta numbers didn’t improve at all.” I opened his container in five minutes and found the problem. His server was running on the default Stape URL, something like abcxyz.ca.stape.io. No custom domain. That one missing step meant he was paying for server-side tracking but getting almost none of the benefit.
If you take one thing from this post: a server container without a custom domain is only half set up.
Why the custom domain matters
The biggest benefit of server-side tagging is first-party cookies. Your server can set cookies like _ga and _fbp from your own domain, so browsers trust them more and keep them longer. But that only works when your tagging server lives on your domain, like ss.yourstore.com. On the default Stape URL, the browser sees a third party.
Two options: subdomain or same origin
| Option | Example | Difficulty | Best for |
|---|---|---|---|
| Subdomain | ss.yourstore.com | Easy, DNS records only | Most small and mid-size sites |
| Same origin | yourstore.com/metrics | Harder, needs a CDN or proxy (Cloudflare, nginx) | Sites that want the longest cookie life in Safari |
Google now prefers the same-origin approach, but a subdomain is still where I start most clients. It takes ten minutes and works well.
How to add a subdomain (step by step)
- Log in to Stape, open your server container and click Add custom domain.
- Type your subdomain, for example
ss.yourstore.com. Keep it short and boring. Avoid words like “track” or “analytics”. - Stape shows you the DNS records to create. By default this is a CNAME record. You can also choose A and AAAA records.
- Go to your DNS provider (Cloudflare, GoDaddy, Namecheap) and add the records exactly as shown.
- Wait for verification. It is often quick, but it can take up to 72 hours. The status changes to Ready when done.
- In Google Tag Manager, open the server container → Admin → Container Settings and paste your new URL as the tagging server URL.
- Update your web GTM snippet so
gtm.jsloads from your domain instead ofgoogletagmanager.com. Better still, use Stape’s Custom Loader power-up, which does this for you.
Mistakes I see all the time
- Orange cloud on in Cloudflare. If the DNS record is proxied during verification, it often fails. Set it to DNS only first.
- Shopify-managed domains. Shopify will not let you create both A and AAAA records on the same subdomain. Use the default CNAME option instead.
- Forgetting the web side. People add the domain on Stape but never change
server_container_urlin the Google tag. Data keeps going to the old URL. - Using a different root domain.
ss.mybrand-tracking.comfor a site onmybrand.comdoes nothing for cookies. The root must match.
A quick client story
A common pattern I see on Shopify stores: the agency before me did everything right in the containers, but left the default Stape URL in place. After we moved to a subdomain and switched on Custom Loader, the share of events carrying a valid _fbp cookie went up noticeably within a week. Same tags, same budget. Just the domain.
Bottom line
Add the custom domain on day one, not “later”. It is the cheapest fix in all of server-side tracking.
Source reading: Stape — custom domain guide, Stape — same origin approach