Conversions API (CAPI) Setup Guide
Setting up Conversions API across the major platforms. Fastest way, best way, every option in between, and the trade-offs nobody puts on the marketing page.
What CAPI actually is
Conversions API (CAPI on Meta, Enhanced Conversions on Google, Events API on TikTok, Conversions API on LinkedIn, Snap CAPI) are all the same idea under different names: a server-to-server endpoint that accepts conversion events directly from your servers, bypassing the browser. They exist because browser-side tracking lost 30 to 50 percent of conversions to iOS App Tracking Transparency, Safari Intelligent Tracking Prevention, ad blockers, and the slow death of third-party cookies.
This guide covers three implementation tiers per platform. Fastest gets you live in 30 minutes with default behavior. Best gets you match rates of 80 percent or higher with full event payloads. Every other way exists for specific stacks.
Meta CAPI
Fastest: native Shopify integration
If you are on Shopify, go to Shopify Admin → Sales channels → Facebook & Instagram → Settings → Conversions API. Click Enable. Done. Shopify sends purchase, add-to-cart, view-content, initiate-checkout server-side automatically. Setup time: 5 minutes. Trade-off: you get Shopify's interpretation of what counts as a conversion and limited control over additional event data.
Best: server-side GTM with custom CAPI implementation
- Set up a GTM server container. Either Google Tag Manager Server Container on Google Cloud Run, or Stape.io for hosted convenience.
- Get your Meta access token. Business Manager → Events Manager → your pixel → Settings → Conversions API → Generate Access Token. Keep it private.
- Install the Meta Conversions API tag in the server container. Use the official Meta Conversions API tag template (or stape's enhanced version with more options).
- Pass first-party data. Configure the tag to send hashed email (em), hashed phone (ph), client IP (client_ip_address), user agent (client_user_agent), Facebook click ID (fbc), and Facebook browser ID (fbp). The Pixel sets fbc and fbp client-side; pass them to server-side via dataLayer or cookies.
- Deduplication. Each event must have an event_id that matches between the Pixel firing and the CAPI firing. Most teams use the order ID for purchase events. Meta deduplicates on event_id + event_name within a short window.
- Test in Events Manager. Test Events tab. Send a test event. Meta shows match score per event and whether deduplication worked. Aim for match score of 8+ on every event.
Setup time: 2 to 4 weeks for a clean production-grade deployment.
Other ways to send to Meta CAPI
- Native WordPress / WooCommerce plugins: PixelYourSite Pro ($169/year), PixelManager. Decent middle-ground.
- Klaviyo's Meta CAPI integration: Fires for Klaviyo-tracked events. Best for brands already deep in Klaviyo.
- Direct API calls from your backend: Send POST requests to https://graph.facebook.com/v18.0/<PIXEL_ID>/events with the event payload and access token. Full control. Most engineering work.
- Segment (Twilio Segment) destination: Connect Segment to Meta. Segment handles the event forwarding. Works if Segment is already your event pipeline.
- Elevar: Specifically built for Shopify + Meta CAPI with deep Shopify integration. See Elevar and alternatives.
Google Enhanced Conversions
Google's equivalent. Goal: pass hashed first-party user data alongside your existing Google Ads conversion tag so Google can match conversions to ad clicks more reliably.
Fastest: Google tag (gtag.js) with automatic enhanced conversions
Google Ads → Tools → Conversions → your conversion action → Enhance your conversions. Toggle on, choose Google tag, and enable automatic collection. Google collects user-provided data from on-page fields automatically. Setup time: 10 minutes. Works for most checkout flows where email and phone are in standard form fields.
Best: manual variable mapping via GTM
If automatic collection misses fields or you want explicit control:
- In Google Ads, Enhance your conversions → choose "Manually configure" and "Use Google tag."
- In GTM, edit the Google Ads Conversion Tracking tag for that conversion action.
- Under "Include user-provided data from your website," select New Variable and configure manual entry.
- Map dataLayer variables for email, phone, first name, last name, address, city, region, postal code, country. Email is required; the rest improve match.
- Test in Google Ads → Conversions → your conversion → Diagnostics. Enhanced conversions status should show "Recording."
Other ways
- Google Tag Manager server container with Enhanced Conversions: Most strong option, similar to Meta CAPI server setup.
- Offline conversion uploads: CSV uploads from your CRM or data warehouse. Useful when conversions happen long after the click (B2B leads, subscription billing).
- Google Ads API: Direct API for the most engineering-heavy stacks. Real-time and reliable but requires development.
TikTok Events API
TikTok's equivalent. Same shape: server-side endpoint, hashed user data, deduplication via event_id.
Fastest: Shopify TikTok app, or TikTok Pixel Helper guided setup. Best: GTM server container with the TikTok Events API tag (community templates exist, official integration is improving). Pass test_event_code while testing so events route to a sandbox and don't pollute production.
LinkedIn Conversions API
Released in 2023. Most useful for B2B accounts where lead-form completions or qualified-lead events need to be passed back to LinkedIn for optimization. Implementation is via direct API (REST endpoints in LinkedIn Marketing API) or via Zapier, RudderStack, or Segment connectors. GTM server-side templates exist but are less mature than Meta or Google.
Snap Conversions API
Same pattern as Meta. Useful for brands with material Snapchat ad spend (typically DTC beauty, fashion, gaming). Implementation via Snap CAPI endpoint or community GTM server template. Lower priority than Meta and Google for most accounts but worth setting up if Snap spend is over ten thousand dollars per month.
Deduplication: the rule that keeps numbers honest
Across every platform, deduplication is the rule that makes the data trustworthy. Pixel and CAPI fire for the same conversion with the same event_id (usually order ID for purchases). The platform counts the conversion once, with whichever side has richer data. Skip deduplication and your reported conversions double, the optimizer learns the wrong CPA, and the CMO presentation does not survive scrutiny.
Common failure modes
Unhashed personal data
Meta and Google reject unhashed PII. Hash email and phone with SHA-256 lowercase before sending. Most libraries do this automatically; verify yours does.
Missing first-party data
CAPI without hashed email is barely better than Pixel-only. The match rate gain comes from passing rich user data, not from server-side delivery alone.
fbc and fbp not passed
The Facebook click ID and browser ID are essential for matching. They get set by the Pixel client-side. To pass them server-side, GTM has to read the _fbc and _fbp cookies and pass them in the CAPI event.
Sending only PageView and AddToCart, not Purchase
The highest-value event to send via CAPI is Purchase. Some setups stop at engagement events. Confirm Purchase is firing server-side every time.
What to read next
For the upstream architecture, see server-side vs client-side tracking. For Shopify-specific implementation, see Shopify GA4 and GTM tracking. For Elevar — the most popular Shopify-Meta-CAPI bridge — see Elevar and alternatives.