Create the server container in GTM
GTM → Admin → Create Container → Server. Pick Manually provision tagging server. Note the Container Config long string — you'll need it.
From zero to a production sGTM container on Google Cloud Run, served on a first-party subdomain with SSL — ready to host CAPI, TikTok EAPI, and Microsoft UET server tags.
GTM → Admin → Create Container → Server. Pick Manually provision tagging server. Note the Container Config long string — you'll need it.
Google ship an official one-click setup. In Cloud Console open Cloud Shell and run:
bash -c "$(curl -fsSL https://googletagmanager.com/static/serverjs/setup.sh)"
Cloud Run → your service → Custom Domains → Add Mapping → Add domain. Enter sgtm.yourdomain.com. Google gives you a CNAME record. Add it in your DNS host. Wait 10–60 min for SSL provisioning.
In your GTM web container → open the Google Tag → Configuration settings → Server Container URL: https://sgtm.yourdomain.com. Save & Submit.
For Meta/TikTok pixels, do the same on each pixel template's First-Party / Server Container URL field.
sGTM → Clients → New → Google Analytics: GA4. Default settings. Save.
Tags → New → Google Analytics: GA4. Measurement ID: your G-XXXXXXXXXX. Trigger: All Events. This is what relays GA4 hits from browser → sGTM → Google.
sGTM has its own Preview button. Hit it, then browse your site. You should see every event from the web container arriving in the sGTM Preview, with the GA4 tag firing and the request to https://www.google-analytics.com/g/collect in the network log.
With the foundation working, layer on the per-platform server tags. See the Meta and TikTok how-tos for the specifics. Each one piggy-backs on the same incoming event stream.