Docs menu · Our proxy container
Getting Started
Integrations
Server-side GTM
COD Order Protection
Advanced Features
Downloads
Tools & Support
Docs / COD Order Protection / Set up GTM
COD Order Protection
Our ready-made proxy container
For stores without an sGTM server: one web container that holds COD orders in the browser.
Before you start
- COD Order Protection is on in PixelFly — Step 1.
- With no server container, the fire path is Receivers. Add one Receiver per platform a confirmed order should reach: Meta, GA4, TikTok, Google Ads.
- Have ready: your API Key (
pf_live_…), Meta Pixel ID and GA4 Measurement ID.
Allow about 10 minutes. Nothing is held until a real API Key is in place.
You edit two kinds of thing in GTM
- Variables — left menu Variables, scroll to User-Defined Variables. Click the name, replace the placeholder, Save.
- Tags — left menu Tags. Click the tag, fill the field inside it, Save.
Almost everything here is a Variable. Each placeholder shows its expected format — match it.
1. Import the container
Download proxy web container (.json)In GTM: Admin → Import Container, choose the file, import. Importing into a container you already use? Use a new workspace, since Merge → Overwrite replaces values you have filled in.
2. Fill in the variables
Variables → User-Defined Variables. These three are the ones you must change:
| Variable | Replace this placeholder | With |
|---|---|---|
PixelFly API Key | pf_live_REPLACE_ME | Your container's API Key |
Meta Pixel ID-000 | 0000000000 | Your Meta Pixel ID |
GA4-FM ID | G-XXXXXXXXXX | Your GA4 Measurement ID |
Leave these two alone unless you have your own tracking domain
| Variable | Default |
|---|---|
PixelFly - Server URL | https://track.pixelfly.io/e |
PixelFly - COD Host | https://track.pixelfly.io |
/e; COD Host has no path at all. If you swap in your own tracking domain, keep that difference — copying one over the other breaks whichever you overwrote.
3. Point GA4 purchases at PixelFly
Set the variable PixelFly - GA4 purchase via from browser to pixelfly, and add a GA4 Receiver in PixelFly.
Why it matters: a held COD order has no browser left to fire from when you confirm it days later, so on browser GA4 would only ever see prepaid orders. On pixelfly, prepaid and confirmed COD orders reach GA4, each exactly once.
4. Switch COD on and publish
Set the variable PixelFly - COD Protection from off to on — this is the master switch — then publish the container.
Optional: Google Ads
Skip unless you run Google Ads. These tags ship paused and cover prepaid orders.
| Where | What | Format |
|---|---|---|
| Variable | 🟣GAds-Conversion ID | Numbers only: 123456789 |
| Tag | Google Ads || AW Tag → Tag ID | With the prefix: AW-123456789 |
| Tag | Google Ads || Purchase → Conversion Label | Typed in the tag, not a variable |
| Tags | Google Ads || AW Tag and Conversion Linker | Un-pause both |
For confirmed COD orders, use either a GA4 → Google Ads import or a Google Ads (click conversions) Receiver — one, not both, or each purchase counts twice. See Google Ads and COD.
Optional: TikTok
Skip unless you run TikTok ads. Set the variable Tiktok_Pixel-000 to your TikTok Pixel ID, then un-pause the TikTok Ads Pixel tags you want. For confirmed COD orders, add a TikTok Receiver in PixelFly. They ship paused, so nothing fires until you do both.
Next
GTM is ready. Now tell your store to mark COD orders — WooCommerce plugin or custom website — then place a test order before going live.