Skip to main content

How to Set Up Server-Side Tracking: Meta CAPI and Google Enhanced Conversions

How to set up Meta’s Conversions API and Google enhanced conversions: the event spec, event match quality, consent, a deduplication test and a weekly check.

Robbie Jack

Founder · 14 min read

Share
Published
Updated
Last verified

Server-side tracking, or server-side conversion tracking, sends your conversions to Meta and Google from a server as well as from the visitor’s browser. In practice that means two setups: Meta’s Conversions API (CAPI), which sends a server copy of each event alongside the Meta Pixel, and Google’s enhanced conversions, which add hashed, consented customer data to the conversions your Google tag already records. Both run next to the browser tag, not instead of it. The Conversions API’s second copy has to be deduplicated against the Pixel. Enhanced conversions, by Google’s setup guide, supplement the tags you already have, so they send no second copy to remove. This guide sets up both in five steps: write the event specification, connect Meta, raise event match quality, turn on enhanced conversions, and prove deduplication with test orders.

For attribution, what this fixes is delivery: fewer events lost to page exits, script failures and browser limits, business event IDs that stay intact, and outcomes that land later in the CRM reaching the platforms at all. It doesn’t make every conversion observable, it doesn’t turn platform attribution into proof of what the ads caused, and it leaves your privacy obligations exactly where they were. Whether it’s worth paying for at your spend, and which paid tool to choose, is answered in is server-side tracking worth it?

What Server-Side Tracking Actually Changes

A browser event starts in the user’s browser. A server event gets sent from a server, a commerce platform, a CRM, or a server-side tag container. Most real implementations run both:

  1. The browser records interaction context and sends an event.
  2. The business backend confirms the order, lead stage, or other outcome.
  3. A server integration sends the permitted event and identifiers to a platform.
  4. The platform tries to match the event to an eligible ad interaction.
  5. Browser and server copies of the same event get deduplicated.

That recovers events you’d otherwise lose to page exits, script failures, and some browser delivery limits. It also carries outcomes that land later, in the CRM. What it can’t do is reconstruct identifiers you never collected, or match every event to a platform account.

Apple’s current tracking-prevention policy makes the distinction clean: browser policy restricts cross-site tracking, and sending the event from a server changes the transport, not the user’s choice or your obligations. What each browser blocks today, and what to build around it, is covered in the guide to post-cookie attribution.

Server-side tracking does not bypass consent, privacy, browser, or platform restrictions. Treat it as a bypass and you get a governance failure and a measurement strategy you can’t trust.

Step 1: Write the Event Specification

Before anyone opens Events Manager, write down what you’ll send. Both platforms deduplicate and match on fields you define once and then keep stable, and most broken setups trace back to two senders that never agreed on them.

A workable event envelope carries:

  • Business event ID
  • Event name and event timestamp
  • Processing timestamp
  • Source system
  • Consent state and purpose
  • Available click IDs and permitted customer identifiers
  • Value, currency, and customer status
  • Schema version

Generate the business event ID once, for the order or the lead-stage change, and put that same value in the browser and server copies. Meta merges the two copies on it.

Consent travels with the event, from collection through to every destination. You need an approved default state, a record of every update, and destination rules for each purpose. Google’s consent-mode implementation guide requires a default consent state, then an update as soon as the visitor makes a choice, and since November 2023 consent mode has carried two advertising signals, ad_user_data and ad_personalization, alongside ad_storage and analytics_storage. Consent mode doesn’t store the visitor’s choice: your consent tool does, and it has to pass each update to the tag.

Don’t send an identifier just because it’s sitting in the warehouse. Your privacy or legal owner approves the use, and the integration enforces retention and deletion.

This step is done when one written page lists every event with its name, its ID rule and its consent rule, and whoever builds the browser tag and the server integration works from that page.

Step 2: Connect Meta’s Conversions API

Meta’s best practices say to use the Conversions API in addition to the Meta Pixel, sending the same events through both. There are several ways to connect it:

  • On Shopify, the Facebook & Instagram app’s data-sharing setting.
  • On another site with the Pixel, Meta’s one-click Conversions API connection in Events Manager.
  • Meta’s Conversions API Gateway.
  • A server-side Google Tag Manager container, which sends the same events to Meta, Google Ads and GA4 from one stream.
  • A direct integration from your backend or CRM, using an access token generated under “Set up manually” in the dataset’s Conversions API settings, per Meta’s getting-started guide.

Which of these to pay for, and what each costs, is in the comparison of the paths.

Whichever path you take, each server event carries the fields Meta’s server event reference requires: event_name, event_time, action_source and user_data, plus event_source_url for a website event. Meta’s best practices also require client_user_agent for every website event. Send value and currency with each purchase, since value is what ROAS bidding works from, and set event_id to your business event ID.

Test before you switch anything else on. Events Manager’s Test Events tool gives you a test code; send it as the test_event_code parameter and, per Meta’s API guide, the server events appear in the Test Events window. Meta also warns that events sent with a test code are not dropped: they flow into Events Manager and are used for targeting and measurement. So keep test events few, note when you sent them, and remove the code before you go live.

This step is done when your server events appear in the Test Events window with the fields above.

Step 3: Raise Event Match Quality

Meta scores Event Match Quality (EMQ) from 1 to 10, based on the customer information sent with each event, and its setup verification guide recommends aiming for 6.0 or higher. The same guide points you to the dataset’s Overview page in Events Manager, where the score shows event by event, and Meta’s best practices say it is currently available only for web events. The score rises with the identifiers Meta can match on. Meta’s customer information reference says which go in how: email, phone and name are hashed with SHA-256, your own customer ID (external_id) should be, and the click ID (fbc), browser ID (fbp), IP address and user agent go in unhashed. The usual cheap fixes are passing fbc and fbp from the browser cookies through to the server event, and sending the email and phone number the customer already typed at checkout, where consent allows.

Matching has a ceiling, though. Platforms match events on whatever signals they get: click IDs, hashed first-party identifiers, device or browser context, and platform account data. Match quality depends on availability, format, consent, platform coverage, and the platform’s own rules.

Stuffing in more fields doesn’t guarantee a match. Hashing protects a value in transit; it doesn’t make the data anonymous, and it doesn’t create permission to use it. Anonymous sessions, second devices, shared accounts, missing click IDs, deletion requests, and people who simply can’t be tied to a platform account are all standing limits on matching.

Meta’s 6.0 tells you whether the integration passes on what you collect. It isn’t a reason to collect more than your privacy owner approved. Don’t invent a universal target like “95% visibility” either: vendors score on different scales against different populations, and a high score sits happily on top of incomplete business data.

This step is done when your purchase or lead event’s score holds steady at a level you can explain from the fields you send, and you know which missing field would raise it.

Step 4: Turn On Google Enhanced Conversions

Enhanced conversions add hashed, consented customer data, such as an email address or phone number, to the conversions your Google tag already records, so Google can match conversions it would otherwise lose. As of April 2026, enhanced conversions for web and for leads are one setting. Google’s setup guide puts it under Goals, then Settings: expand Enhanced conversions, turn it on and accept the customer data terms. Then choose how the data reaches Google: the Google tag (which can find the form fields itself, or read them from CSS selectors, JavaScript variables or a code snippet), Google Tag Manager, or an API connection. You can send the data unhashed for Google to normalize and hash, or hash it yourself with SHA-256.

For lead generation, the same setting covers leads that close later. The tag captures the hashed email on the form, and when the lead qualifies in your CRM you import that conversion with the same hashed data, so Google can match it even when the click ID is missing. Google still advises importing the click ID (GCLID) wherever you have it. Since June 15, 2026, offline conversion imports and enhanced conversions for leads uploads go through the Data Manager API and are blocked in the Google Ads API; Google says developer tokens that sent no request between January and June 2026 don’t get legacy access.

Map your consent banner to ad_user_data before you turn any of this on, so customer data only reaches Google when the visitor agreed to share it for advertising.

Two delivery options sit underneath. A server-side Google Tag Manager container receives events from your site and forwards them to Google Ads and Analytics from your own endpoint. Google tag gateway for advertisers is lighter: it serves the Google tag from your own infrastructure, through your CDN, load balancer or web server, per Google’s tag gateway guide, which helps delivery without changing what you collect.

This step is done when the conversion action’s tag diagnostics report, which Google’s enhanced conversions guide says appears about 72 hours after setup, shows its health checks passing.

Step 5: Prove Deduplication Before Launch

Run the Pixel and the Conversions API without deduplication and Meta will count one outcome twice. Meta’s deduplication rules merge a browser and a server event when the event name matches and the Pixel’s eventID matches the server’s event_id, and only when the second copy arrives no more than 48 hours after the first. For offline imports, Google’s upgrade guide recommends a unique event identifier for the same reason.

An HTTP success only tells you the request was accepted at that boundary. It says nothing about whether the event was matched, deduplicated, attributed, or used for bidding. So run test transactions through both of Meta’s paths, remembering that Meta counts them as real events:

  1. Trigger one browser and one server event with the same event ID.
  2. Confirm both arrive in Meta’s Test Events window.
  3. Confirm Meta counts one conversion: Meta’s setup verification guide points you to the event’s details and its Event Deduplication tab, which shows the share of events deduplicated.
  4. Retry the server request and confirm it stays idempotent.
  5. Send a different event ID and confirm it counts separately.

On Google there is one copy to check, not two. Place a test order through the tag and confirm the conversion action records it once. If you import offline conversions, upload the same one twice with the same event identifier and confirm it counts once.

This step is done when each test order counts once on both platforms. If a platform later shows about double the purchases your store does, the cutover checklist covers what to check before you touch a campaign.

Reconcile Every Destination With the Business Outcome

You measure collection quality with a bridge, not with one dashboard.

LayerQuestion
Commerce or CRMHow many valid business outcomes occurred?
FinanceWhat revenue and contribution were recognized after refunds and adjustments?
Event pipelineHow many unique events were produced, accepted, retried, or rejected?
AnalyticsWhich events appeared under its identity and processing rules?
Ad platformWhich accepted events received credit under its attribution rules?

Reconcile on business event ID where you can, then explain what’s left over. The usual culprits: duplicate sends, missing consent, invalid identifiers, schema changes, offline lag, attribution windows, refunds, and different customer populations.

The eight checks for working through those gaps are in why marketing data is wrong and how to fix it.

Don’t “fix” reconciliation by forcing platform totals to match finance. Platform attribution and recognized business outcomes answer different questions, so of course they disagree. What you want is a documented bridge with named owners and expected differences.

Feed Platforms Qualified Outcomes

Server collection earns its keep when it returns a stable downstream outcome, not just a page view or a form submission.

For lead generation:

  1. Capture an eligible click ID and permitted first-party identifier with the lead.
  2. Assign qualification through a documented CRM stage.
  3. Send the stage promptly with a unique event ID and the original event time.
  4. Monitor accepted, rejected, delayed, and unmatched records.
  5. Keep the new action observational until volume and quality settle.
  6. Change bidding only with a baseline and a rollback rule.

Google’s offline import guide requires a conversion timestamp and an identifier, such as a GCLID or user-provided data, with each upload, and its import guidelines set the windows: an offline conversion uploaded more than 90 days after its last click isn’t imported, or more than 63 days after it for enhanced conversions for leads. Those are product rules, and they don’t tell you the attributed pipeline was incremental. The full operating design for lead generation is in stop optimizing Google Ads for form fills.

For ecommerce, send confirmed transactions with unique order IDs and honest values. Push refunds and cancellations into the business reporting bridge even when a platform’s own adjustment workflow works differently. And split new, returning, and reactivated customers, so a shift in customer mix can’t hide inside your bidding value; without that split, prospecting ads end up re-buying existing customers.

Keep Attribution and Causality Separate

Once this is built, you can answer:

  • Whether the browser and server paths delivered the unique events you expected
  • Which records were rejected or unmatched
  • How platform-attributed outcomes reconcile with CRM, commerce, and finance
  • Which event the platform is allowed to optimize toward

What you still can’t say is that the advertising caused any of it. Server-side tracking does not prove causal or incremental impact: better collection improves the input to an attribution system without making that system causal.

For causal questions, run holdouts, conversion-lift studies, or a credible quasi-experiment. For portfolio allocation, use a calibrated MMM. How to give each lens its own job and cadence is covered in attribution vs incrementality vs MMM.

Every Week: The Health Check

Review:

  • Business outcomes versus unique pipeline events
  • Browser/server duplicate rate
  • Acceptance, rejection, retry, and late-event counts
  • Event Match Quality in Meta and enhanced conversions diagnostics in Google
  • Consent-state distribution and unexpected changes
  • CRM or commerce schema changes
  • Platform totals versus finance, with known bridge items

Alert on changes rather than vanity thresholds. A match-quality drop right after a form release is actionable, while a vendor score climbing as qualified pipeline falls isn’t a win. What you’re building is durable, governed collection that gives your team better feedback without pretending the data proves more than it does.

Want to know whether your tracking is what’s holding back your Meta and Google acquisition, with the first changes we’d make? Get your free growth review.

About GrowthMarketer

GrowthMarketer runs Meta and Google Ads for self-service SaaS and DTC brands spending $100K–$1M a month, for a flat $20,000 a month and no markup on media, so it never earns more when you spend more.

Robbie Jack

Founder of GrowthMarketer. He co-founded TrueCoach, built its growth system and sold the company in 2020.

Skip the pitch. Get your free growth review.

Answer seven questions. Within two business days you get a written review of your ads, landing pages and tracking, with the first changes we’d make.