Server-to-Server Postbacks for Performance Marketing
A clear, step-by-step guide to Server-to-Server (S2S) postbacks: how to capture click IDs (fbclid, gclid, ttclid), stop losing conversions to ad blockers and Safari cookie limits, and avoid double-counting sales.
- 01 What Is a Server-to-Server (S2S) Postback—and Why Do Browser Pixels Miss Conversions?
- 02 How to Format Click IDs (fbclid, gclid, ttclid, subid) So Platforms Accept Them
- 03 How to Run Both a Browser Pixel and S2S Postback Without Double-Counting Sales
- 04 A 5-Step Checklist for Setting Up S2S Postbacks Before You Scale
1. What Is a Server-to-Server (S2S) Postback—and Why Do Browser Pixels Miss Conversions?
A Server-to-Server (S2S) postback (also called server-side conversion tracking or a webhook ping) is a direct message sent from your backend server, CRM, or affiliate network straight to your ad platform or traffic tracker whenever a customer completes a lead or purchase.
Why does this matter so much for a media buyer's budget? Traditional tracking relies on a JavaScript browser pixel firing inside the shopper's phone browser on a "Thank You" page. Today, relying only on a browser pixel means you quietly lose a noticeable share of your real conversions (how much depends on your vertical, how many customers use iPhones, and how your checkout flow works). Browser pixels fail in three everyday situations:
- Apple Safari Cookie Limits (ITP) & Firefox Tracking Protection: Apple's Intelligent Tracking Prevention (ITP) restricts JavaScript cookies (
document.cookie) to 7 days—or just 24 hours when the link carries tracking parameters. If a buyer clicks your ad on Monday and buys on Wednesday, a browser-only cookie is already gone. - Ad Blockers & Privacy Browsers: Extensions like uBlock Origin, Brave Shields, and DNS filters block requests to
connect.facebook.net,analytics.tiktok.com, andgoogleadservices.com. The customer buys your product, but the browser pixel is blocked from telling Facebook or Google. - Phone Confirmation & CRM Delays (COD / Lead Gen / SaaS): In lead generation, cash-on-delivery (COD) e-commerce, and B2B software, a lead is only confirmed hours or days later in your call center or CRM—long after the buyer closed their browser tab.
An S2S postback solves all three problems. When a visitor opens your landing page, your server saves the unique Click ID from the URL (fbclid, gclid, ttclid, or your tracker's subid). Later, when the order is confirmed in your CRM, your server sends an HTTPS ping carrying that saved Click ID directly to the ad network's Conversion API or tracker.
Extracts fbclid/gclid/ttclid on HTTP 200 entry and stores
Assigns a deterministic UUID (e.g., ord_98412) to the conversion transaction
Sends browser event with event_id=ord_98412 (if not blocked by ITP/ad-blockers)
Server sends S2S postback with click ID, payout
Shopper taps ad; URL carries ?fbclid=...&subid=clk_98231
Landing page saves subid and click ID in your database/form
CRM verifies the lead or payment and filters out spam bots
Your server sends the conversion + click ID directly to CAPI / Tracker
2. How to Format Click IDs (fbclid, gclid, ttclid, subid) So Platforms Accept Them
Every ad network attaches its own unique Click ID to your landing page link when someone clicks an ad. If you send that Click ID back in the wrong format, the platform's API will ignore your conversion. Here is the exact rule for each major platform:
- Meta Ads (
fbclid→fbcformat): When someone taps a Facebook or Instagram ad, the link includes?fbclid=IwAR.... Crucial rule: When sending this to the Meta Conversions API (CAPI), never send the rawfbclidstring by itself in thefbcfield! Meta requires the full cookie format:fb.1.<timestamp_in_milliseconds>.<fbclid>(for example,fb.1.1731196800123.IwAR0...). - Google Ads (
gclid,gbraid,wbraid): Google usesgclidfor standard clicks, plus two privacy-safe IDs (gbraidandwbraid) for iOS traffic under Apple's privacy rules (Google Offline Conversion Imports). Save all three columns in your database alongside the exact click timestamp. - TikTok Ads (
ttclid): TikTok adds?ttclid=...to every ad click. Keep the exact uppercase/lowercase letters intact and pass it inside thecontext.ad.callbackfield when sending events to the TikTok Events API. - Tracker & Filter
subid: Traffic filtering and analytics platforms like Cloaking Master and affiliate trackers generate a unique internal click ID (usually calledsubidorclick_id) for every visitor so your affiliate network or CRM can ping back the exact sale status.
| Platform / System | URL Parameter | Required Server / API Format | Important Rule to Remember |
|---|---|---|---|
| Meta Conversions API | fbclid |
Must be formatted as fb.1.<timestamp_ms>.<fbclid> in the fbc field |
Case-sensitive; raw fbclid without fb.1.<time>. prefix is rejected |
| Google Ads Offline / Enhanced | gclid, gbraid, wbraid |
Exact string (up to 255 chars) + click timestamp | Case-sensitive; valid for up to 90 days for offline imports |
| TikTok Events API | ttclid |
Exact string sent inside context.ad.callback |
Case-sensitive; valid within TikTok’s 7-to-28-day attribution window |
| Cloaking Master / Trackers | subid / click_id |
Unique token passed to postback URL ?subid={subid}&status=lead |
Deduplicate by subid + status so retries don’t double-count revenue |
3. How to Run Both a Browser Pixel and S2S Postback Without Double-Counting Sales
The best setup in modern media buying is a hybrid setup: running your browser pixel and your server-side S2S postback at the same time. The browser pixel gives the ad network instant browser context when it works, and the server postback catches every sale that ad blockers or Safari cookie limits would have lost.
To keep Facebook, TikTok, or Google from counting every sale twice, follow three simple rules:
- Share One
event_idBetween Browser and Server (Deduplication): When a customer submits Order#90412, generate one unique ID—likelead_90412. Sendevent_id: "lead_90412"in your browser pixel call, and send the exact sameevent_id: "lead_90412"in your server CAPI postback (Meta Event Deduplication Guide). When Meta sees the sameevent_idfrom both places within 48 hours, it automatically merges them into one single conversion. - Ignore Duplicate Webhook Retries (Idempotency): Sometimes an affiliate network or CRM sends the same postback 3 times because of a brief internet hiccup. Idempotency simply means your tracker checks whether
transaction_id #90412was already recorded—if it was, it replies200 OKwithout adding a second payout. - Lock Your Postback URL With a Secret Key: Never leave your postback URL wide open without a password token or IP allowlist, or competitors and bots can send fake postbacks to mess up your stats.
Never Send S2S Postbacks for Bot Clicks: Only fire an S2S conversion postback after your server verifies the lead or payment and confirms the visit passed your bot filter. Sending fake bot leads to Meta CAPI or Google Ads teaches the ad algorithm to go buy you more bots!
4. A 5-Step Checklist for Setting Up S2S Postbacks Before You Scale
When connecting an ad platform, a traffic filter or tracker (such as Cloaking Master), and your affiliate network or CRM, check these five points before scaling your budget:
- Check That Ad URL Macros Actually Fill In: Click a live preview of your ad and make sure placeholders like
{campaign.id}are replaced with real numbers—not literal curly braces in your logs. - Pass Your Tracker
subidInto the Form or Affiliate Link: When a buyer clicks from your pre-lander to the checkout page or affiliate network, pass the tracker'ssubidinside a hidden form field orsub1link parameter so the CRM can send it back when the user buys. - Separate "Lead" From "Approved Sale" Statuses: Set up separate postback statuses for initial signups (
lead), paid/confirmed orders (sale/approved), and bad/fake numbers (rejected/trash). Only send verified leads and real sales to your ad network's Conversion API. - Verify Meta
fbcFormat in the "Test Events" Tab: Open Meta Events Manager → Test Events, click your link with a testfbclid, and confirm that the server event showsfbcformatted asfb.1.<timestamp_ms>.<fbclid>and matches the browser pixel'sevent_id. - Fire One Test Postback Twice: Trigger a test conversion from your CRM, confirm your tracker logs
HTTP 200 OKwith the right payout, and fire the exact same test postback a second time to verify it does not create a duplicate sale.
- A Server-to-Server (S2S) postback sends conversion data directly from your server or CRM to your tracker and ad …
- Accurate S2S tracking starts on the first click: your landing page must grab the ad platform’s click ID (`fbclid…
- When you run both a browser pixel and a server postback (like Meta CAPI or TikTok Events API), always send the e…
Meta’s official Conversions API documentation requires the fbc parameter to follow exact fb.1.<timestamp>.<raw_f…
Frequently Asked Questions (FAQ)
Why does Meta Conversions API reject or ignore my raw fbclid value?
Meta CAPI requires the fbc field to follow the exact cookie format: fb.1.<creation_time_ms>.<fbclid>. Sending the raw fbclid string without the fb.1.<timestamp_ms>. prefix breaks Meta’s specification and lowers your Event Match Quality score.
If I use Server-to-Server postbacks, should I delete my browser pixel?
In most compliant campaigns, running both the browser pixel and the server-side API (a hybrid setup) with a shared event_id works best. The browser pixel captures immediate browser signals, while the S2S postback acts as a rock-solid backup when ad blockers or Safari ITP block the browser script.
How do I stop duplicate conversions when an affiliate network retries a postback?
Give every conversion a unique transaction_id or event_id and set your database or tracker to ignore duplicate IDs. Ad platforms also automatically merge browser and server events that share the same event_id and event_name.
Related Technical Guides
View Topic Archive →Campaign Attribution: Diagnosing Technical Discrepancies
A plain-English guide to why Ad Manager clicks, tracker visits, Google Analytics sessions, and CRM sales never match 1:1—and how to fix lost click IDs, slow mobile loads, and WebView cookie gaps.
How to Choose Traffic Filtering Software for Affiliate Marketing
A practical buyer’s checklist for choosing traffic filtering and bot protection software: checking API speed (<50 ms), mobile CGNAT and iCloud Private Relay accuracy, fail-open safety, and clear click logs.
Traffic Filtering Explained: Edge Defense, Synthetic Case Study, and Policy Compliance
A clear, complete guide to web traffic filtering: how edge firewalls, bot management, and attribution routing work together—plus a step-by-step case study on avoiding costly false positives.
Google Ads Cloaking: AdsBot Verification, Parallel Tracking, and Circumventing Systems
Understand how Google Ads checks your landing page in real campaigns, why Parallel Tracking broke old redirect cloakers, and how to keep strict firewalls from triggering Circumventing Systems bans.