Server-Side GTM (Stape)
Own CDN routing through data.digitalasur.com — first-party, ad-blocker-resistant, free tier, no card required.
- Hosting: Stape.io, free tier (5 free containers, 10,000 requests/month), India region. Chosen over self-hosting via Google Cloud Run specifically because Cloud Run requires a payment card on file even for its Always Free tier — Stape’s free tier requires no card at all.
- Routing: custom subdomain data.digitalasur.com, connected via Own CDN (proxies the sGTM tagging URL through the same IP as the main website, extending first-party cookie lifespan in Safari/Firefox beyond ITP’s default truncation).
Required Cloudflare Rules for Own CDN (hostname contains data.digitalasur.com)
- Configuration Rule — SSL/TLS mode: Full
- Request Header Transform Rule — set static header X-From-Cdn: cf-stape
- Cache Rule — Bypass cache entirely
- (SEO hygiene, added separately) Response Header Transform Rule — set static header X-Robots-Tag: noindex, nofollow
- Web-to-server connection: a server_container_url Configuration Parameter added to the GA4 - Configuration tag in the Web container, pointing to https://data.digitalasur.com. Confirmed live: this constant’s value matches exactly.
- Server container contents: a GA4 Client (built-in, auto-created), a GA4 Server Tag, triggered on Client Name equals GA4.
- Verified working: confirmed via 11/11 real 204 (success) responses from google-analytics.com/g/collect, and real GA4 Realtime data flowing.
- The gtm.js loader-URL swap is a separate, distinct piece from the transport URL above — see the dedicated guide for why doing only one leaves the job half-finished.