Shopflo supports server-side Google Tag Manager (sGTM) integration. Instead of relying on browser-side pixels that get blocked by ad blockers or delayed by page load, Shopflo sends checkout events directly from the server to your GTM container — giving you more reliable, accurate data across all your destinations.
How it works: Shopflo sends a single HTTPS POST to your GTM server container. The container receives it via a custom client and fans the data out to any destination you configure — GA4, Meta CAPI, Google Ads, TikTok, and more.
One inbound POST → one client → many destinations.
⚠️ First time using GTM? Set up your GTM account and GCP billing before starting. Once that's ready, come back and follow the phases below. Total setup time: ~30 minutes.
Phase 1 — Create the GTM Server Container (~5 min)
Step 1: Go to tagmanager.google.com → Create Account → Create Container.
Step 2: Set the platform to Server.
Step 3: Choose Automatically provision tagging server → select your GCP project and region → Create.
Step 4: Wait 3–5 minutes. Once provisioning completes, copy the tagging server URL. It will look like:
You'll need this URL at the end — keep it handy.
Phase 2 — Add the Shopflo S2S Client (~10 min)
Step 1: In your container, go to Templates → Client Templates → New.
Step 2: Name it Shopflo S2S Client.
Step 3: In the Fields tab, add one text field:
Display name:
Request pathName:
requestPathDefault value:
/shopflo/event
Step 4: In the Code tab, paste the Shopflo client code provided by Shopflo engineering. Save the template.
Step 5: Go to Clients → New → pick Shopflo S2S Client → set Priority to 100 → Save.
Phase 3 — Create Variables and Triggers (~10 min)
Variables — go to Variables → New → Event Data, create one variable per field:
Variable name | Key path |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Triggers — go to Triggers → New → Custom Event (match type: Equals), one per event:
Trigger name | Event name |
|
|
|
|
|
|
|
|
|
|
|
|
Add only the events you need — you can always add more later.
Phase 4 — Add a Destination Tag (GA4 Example) (~5 min)
Step 1: Go to Tags → New → Google Analytics: GA4.
Step 2: Enter your Measurement ID (G-XXXXXXXXXX) — find this in GA4 under Admin → Data Streams.
Step 3: Set Event Name to {{EvD - event_name}}.
Step 4: Add event parameters:
Parameter name | Value |
|
|
|
|
|
|
|
|
|
|
Step 5: Set Triggering to T - purchase (add other triggers as needed) → Save.
Adding more destinations later (Meta CAPI, Google Ads, TikTok, etc.)? Just add a new tag. The client, variables, and triggers stay exactly the same.
Phase 5 — Publish and Verify (~5 min)
Step 1: Top right → Submit → Publish. Saving alone does nothing — you must publish for changes to take effect.
Step 2: Share your tagging server URL with Shopflo engineering — they'll configure it as the endpoint_url in your downstream config.
Step 3: Verify: fire a test checkout and check GA4 → Reports → Realtime for the purchase event within ~30 seconds.
Events Shopflo Sends to Your Container
Event | Triggered when |
| Shopper opens Shopflo checkout |
| Shopper submits delivery address |
| Shopper proceeds to pay |
| Order placed successfully |
| Order is cancelled |
| Refund is issued |
Troubleshooting
Symptom | Fix |
Getting a | Check that the container version is published and client priority is set to 100 |
Getting a | Request path mismatch — confirm it's set to |
Events not showing in GA4 Realtime | Double-check the Measurement ID and confirm the tag is firing in GTM Preview |
| Ensure |
Tag changes not taking effect | You saved but didn't publish — hit Submit → Publish |
What to Hand Off to Shopflo Engineering
Once your container is live, share the following with Shopflo engineering:
Your tagging server URL
Confirm the endpoint path is
/shopflo/eventAny auth token if you've added one (optional for testing, recommended for production)
Need more help? Reach out to us at support@shopflo.com
