Browse the documentation
Boosters
Shopify apps
Same-Origin Setup
DNS Setup
Getting Started with sGTM Hosting
Set up with Vercel
Create a file at api/metrics.js that acts as a proxy. The serverless function intercepts requests, extracts the real IP from the x-forwarded-for, and routes the request to the sGTM container with the appropriate headers.
1 min readUpdated on 6 November 2026
Create a file at api/metrics.js that acts as a proxy. The serverless function intercepts requests, extracts the real IP from the x-forwarded-for, and routes the request to the sGTM container with the appropriate headers.