Blog

The seven sGTM client templates worth knowing

Most teams use the GA4 client and one or two others. The remaining ones cover patterns that are easy to miss.

A client in sGTM is the component that listens for incoming requests and translates them into events. The default container ships with a GA4 client. The marketplace has dozens more. Seven of them solve problems that come up often enough to be worth knowing about.

1. GA4 (built-in)

Handles GA4 measurement protocol requests on the standard path. Configure once and forget. The six settings that matter are documented separately.

2. Universal Analytics (built-in, deprecated)

Still useful if you have legacy implementations forwarding UA hits. Translate them to GA4 events inside your container. Less useful since UA was sunset, but if you inherited a setup with UA still in it, this is how you bridge.

3. Web Container (built-in)

Serves the gtm.js loader through your custom domain. This is the client that makes the custom domain setup useful. Without it, you can receive events but not serve the loader.

4. Measurement Protocol GA4

For server-to-server events that do not originate in a browser. If your backend wants to send a purchase event to GA4 directly (without going through the browser), this is the client that receives it.

5. Webhook

A generic client that accepts arbitrary JSON POSTs. Use cases: Stripe webhooks for purchase tracking, Shopify order webhooks, mail provider bounce events. The client parses the payload and exposes it as event data for downstream tags.

6. Stape Power-Ups (third-party)

A collection of clients that solve specific patterns: bot filtering, geo enrichment, header injection. Worth browsing the marketplace for problems you would otherwise have to solve in custom code.

7. Custom Template clients

If none of the above fits, write your own. The Custom Template editor gives you full access to the request, headers, body, cookies. Use this for proprietary protocols, non-standard endpoints, or wrapping a destination that does not have an off-the-shelf client.

For most teams the working set is GA4 + Web Container + Webhook, plus one or two third-party clients depending on what destinations they integrate with. Adding more clients than you need adds processing overhead on every request, so be intentional.