Ad platforms optimize on the conversion signals you send them. If those signals are incomplete, duplicated or missing revenue values, the algorithm optimizes on a distorted picture, and your CPA and ROAS suffer for it. The modern answer is a hybrid setup: browser pixels and server-side events working together.
This guide covers how that works on Meta, Google and TikTok, how to deduplicate events properly, and how to test the whole thing before real budget goes behind it.
Why pixels alone are no longer enough
A browser pixel is JavaScript that runs on the visitor's device. It is easy to install, but it depends on the browser cooperating, which increasingly it does not:
- Ad blockers and privacy extensions block common pixel scripts.
- Safari and Firefox restrict cookies and shorten their lifetimes.
- iOS App Tracking Transparency limits tracking inside apps, including in-app browsers.
- Slow pages, redirects and closed tabs stop pixels from firing at all.
Server-side events, sent from your server or CRM directly to the ad platform's API, are not affected by any of these. But they lack some of the browser context (cookies, user agent, page URL) that helps platforms match events to people. Using both, and telling the platform which events are duplicates, gives you the best of each.
Browser pixel
- Rich browser context and cookies
- Captures on-page events easily
- Blocked or lost on a meaningful share of visits
Server events (CAPI)
- Not affected by blockers or browser limits
- Can use confirmed CRM data: order ID, real revenue
- Needs identifiers passed along to match well
How each platform does it
| Platform | Browser side | Server side | Click ID |
|---|---|---|---|
| Meta | Meta Pixel | Conversions API (CAPI) | fbclid |
| Google Ads | Google tag / conversion tag | Enhanced conversions, offline conversion imports | gclid |
| Google Analytics 4 | Google tag (gtag.js / GTM) | Measurement Protocol | n/a |
| TikTok | TikTok Pixel | Events API | ttclid |
Meta: Pixel + Conversions API
Meta's recommended setup sends the same key events (such as Purchase) through both the Pixel and the Conversions API. Server events should include as many customer parameters as you legitimately have, such as hashed email and phone, client IP and user agent, and the _fbp and _fbc browser identifiers, to improve the event match quality Meta reports in Events Manager.
Google Ads and GA4
For Google Ads, enhanced conversions supplement the conversion tag with hashed first-party data (such as email) to improve matching, and offline conversion imports let you upload conversions tied to a stored gclid. For GA4, the Measurement Protocol lets your server send events directly; it is designed to supplement the browser tag rather than replace it, and events need the visitor's GA client ID to be stitched to the right session.
TikTok: Pixel + Events API
TikTok follows the same pattern as Meta: send key events from both the Pixel and the Events API, pass the ttclid and customer identifiers you have, and share an event ID so TikTok can deduplicate.
Deduplication: the step everyone gets wrong
If the same purchase arrives from both the browser and the server, the platform must know they are the same event. Otherwise you report two purchases, double the revenue, and train the algorithm on fiction.
-
Generate one ID per event
Create a unique event ID when the event happens. For purchases, the CRM order ID (or order ID plus event type) is a natural choice.
-
Send the same ID from both sides
On Meta and TikTok, pass it as the
event_idon the pixel event and the server event, with the same event name. On Google, pass the order ID as thetransaction_id.Same event, two channels// Browser fbq('track', 'Purchase', { value: 49.99, currency: 'USD' }, { eventID: 'order_98765' }); // Server (Conversions API payload, abbreviated) { "event_name": "Purchase", "event_id": "order_98765", "action_source": "website", "custom_data": { "value": 49.99, "currency": "USD" } }
-
Verify in the platform
Check the platform's event diagnostics to confirm events are being received from both sources and deduplicated, not counted twice.
Purchase values, currency and upsells
Ad platforms increasingly optimize for value, not just volume. That only works if the values are right:
- Send real revenue. Use the actual charged amount from the order, not a hard-coded number.
- Always send currency as an ISO code (
USD,EUR,GBP), especially on multi-currency funnels. - Treat upsells deliberately. Each accepted upsell is real revenue. Report it as its own event with its own event ID, using one consistent convention, so the total in the platform matches the total in the CRM without double counting.
- Decide how trials count. A $0 or $4.95 trial is not the same as a full-price sale. Agree on which event the platform should optimize toward, and keep it consistent.
A common silent leak: the thank-you page fires the front-end purchase, but the upsell pages fire nothing. The funnel's real AOV might be $90 while the ad platform believes it is $40, and value-based bidding makes decisions accordingly.
Capturing click IDs
Ad platform click IDs (fbclid, gclid, ttclid) arrive as URL parameters on the landing page. To use them in server events or offline imports:
- Capture them on the first page view, before any redirect can strip them.
- Carry them through the funnel alongside your tracker's click ID.
- Store them on the order in the CRM, so server-side events can include them later.
The same discipline applies to affiliate tracking. See Server-to-Server Postback Tracking for how click IDs flow through to postbacks.
Consent and privacy
Server-side tracking is more reliable, not exempt from privacy rules. Keep these in mind:
- In regions with consent requirements (such as the EU and UK), respect the visitor's consent choices for both browser and server events. Google's Consent Mode is designed for exactly this.
- Hash personal identifiers (such as email and phone) as each platform specifies before sending them.
- For health-related offers, be especially careful. Do not send sensitive health information in event names, parameters or URLs, and review each platform's policies for your vertical. Telehealth adds its own obligations; see Telehealth for affiliate & DR marketers.
Page URLs and query strings are often sent automatically with pixel events. If your funnel puts personal or health information in URLs, that data can leak to ad platforms without anyone intending it.
Testing before you spend
Every platform provides tools to see events as they arrive. Use them on every launch:
| Platform | Testing tools |
|---|---|
| Meta | Test Events in Events Manager; Meta Pixel Helper browser extension |
| GA4 DebugView; Google Tag Assistant | |
| TikTok | Test events in TikTok Events Manager; TikTok Pixel Helper browser extension |
A good test places a real test order through the full funnel, accepts at least one upsell, and confirms that each event appears once, from both browser and server, with the correct value and currency.
Key takeaways
- Browser pixels under-report; server-side events fill the gaps but need identifiers to match well.
- Run both, and deduplicate with a shared event ID (Meta, TikTok) or transaction ID (Google).
- Send real revenue and currency, and track upsells consistently so platform totals match the CRM.
- Capture platform click IDs on the first page view and store them on the order.
- Respect consent, hash identifiers, keep sensitive data out of URLs, and test every launch.
