Traffic Filtering
Traffic Filtering & Bot Defense Technical Editorial Guide

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.

Traffic Filtering Editorial Desk 10 min read EN

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:

  1. 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.
  2. Ad Blockers & Privacy Browsers: Extensions like uBlock Origin, Brave Shields, and DNS filters block requests to connect.facebook.net, analytics.tiktok.com, and googleadservices.com. The customer buys your product, but the browser pixel is blocked from telling Facebook or Google.
  3. 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.

Server-to-Server (S2S) Postback & Hybrid Deduplication Lifecycle
How click tokens are captured on landing, persisted in CRM/tracker state, and reconciled via event_id.
HYBRID S2S ARCHITECTURE
1. Click Ingestion
Capture Click ID +

Extracts fbclid/gclid/ttclid on HTTP 200 entry and stores

2. Checkout / Lead
Generate Shared event_id

Assigns a deterministic UUID (e.g., ord_98412) to the conversion transaction

3A. Browser Path
Client Pixel Fires (Optional)

Sends browser event with event_id=ord_98412 (if not blocked by ITP/ad-blockers)

3B. Server S2S Path
Authenticated Webhook / CAPI

Server sends S2S postback with click ID, payout

How to read this diagram: Sharing a deterministic event_id across browser and server prevents double-counting while recovering conversions lost to WebView closure and ITP.
How a Server-to-Server (S2S) Postback Tracks a Sale Step by Step
PIPELINE FLOW
Step 1
1. Ad Click

Shopper taps ad; URL carries ?fbclid=...&subid=clk_98231

Step 2
2. Save Click ID

Landing page saves subid and click ID in your database/form

Step 3
3. Order Confirmed

CRM verifies the lead or payment and filters out spam bots

Step 4
4. Server Ping (S2S)

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 → fbc format): 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 raw fbclid string by itself in the fbc field! Meta requires the full cookie format: fb.1.<timestamp_in_milliseconds>.<fbclid> (for example, fb.1.1731196800123.IwAR0...).
  • Google Ads (gclid, gbraid, wbraid): Google uses gclid for standard clicks, plus two privacy-safe IDs (gbraid and wbraid) 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 the context.ad.callback field 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 called subid or click_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:

  1. Share One event_id Between Browser and Server (Deduplication): When a customer submits Order #90412, generate one unique ID—like lead_90412. Send event_id: "lead_90412" in your browser pixel call, and send the exact same event_id: "lead_90412" in your server CAPI postback (Meta Event Deduplication Guide). When Meta sees the same event_id from both places within 48 hours, it automatically merges them into one single conversion.
  2. 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 #90412 was already recorded—if it was, it replies 200 OK without adding a second payout.
  3. 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:

  1. 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.
  2. Pass Your Tracker subid Into the Form or Affiliate Link: When a buyer clicks from your pre-lander to the checkout page or affiliate network, pass the tracker's subid inside a hidden form field or sub1 link parameter so the CRM can send it back when the user buys.
  3. 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.
  4. Verify Meta fbc Format in the "Test Events" Tab: Open Meta Events Manager → Test Events, click your link with a test fbclid, and confirm that the server event shows fbc formatted as fb.1.<timestamp_ms>.<fbclid> and matches the browser pixel's event_id.
  5. Fire One Test Postback Twice: Trigger a test conversion from your CRM, confirm your tracker logs HTTP 200 OK with the right payout, and fire the exact same test postback a second time to verify it does not create a duplicate sale.
⚡ Quick Facts
  • 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…
⛔️ Important Note
Never Mutate Case or Append Characters to Raw fbclid Values

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 →