Browser-based tracking is losing ground fast. Between privacy updates, cookie restrictions, and the growing use of ad blockers, relying solely on pixel-based conversion tracking leaves real gaps in your marketing data. Those gaps translate directly into poor optimization signals, misattributed revenue, and ad platform algorithms that cannot find your best customers.
The Conversion API (also called CAPI or server-side tracking) solves this by sending conversion events directly from your server to ad platforms like Meta, Google, and TikTok, bypassing the browser entirely. No cookies to block. No privacy settings to interfere. Just clean, direct data flowing from your backend to the platforms that need it most.
The result is more reliable conversion data, better optimization signals for ad algorithms, and stronger campaign performance over time. Meta, Google, and TikTok all strongly recommend using server-side tracking alongside your existing pixel setup because the combination consistently outperforms pixel-only tracking.
But getting the Conversion API set up can feel intimidating, especially if you are not a developer. There are credentials to generate, endpoints to configure, deduplication logic to implement, and testing tools to navigate across multiple platforms.
This guide walks you through every step of a complete Conversion API setup. From auditing your current tracking all the way through testing, validating, and optimizing your events, these steps apply whether you are configuring Meta's Conversions API, Google's server-side tagging, TikTok's Events API, or a multi-platform solution. By the end, you will have a working server-side tracking setup that feeds accurate, enriched conversion data back to your ad platforms so their algorithms can do what they do best.
Before you touch a single line of code or generate a single API credential, you need a clear picture of what you are already tracking and what you actually want to send server-side. Skipping this step is one of the most common reasons CAPI setups end up messy, incomplete, or full of duplicate data.
Start by reviewing your existing pixel or tag-based tracking setup. Open your Meta Events Manager, Google Ads conversion actions, or whatever tag management system you are using, and list every event that is currently firing. This typically includes page views, add to cart, initiate checkout, purchases, lead form submissions, and any custom events specific to your business.
Next, identify where browser-side tracking is failing you. Look for events with unusually low fire rates compared to what your backend records show. A purchase event that fires far less often than your actual order count is a clear sign that ad blockers, iOS restrictions, or cross-domain navigation are eating your data. These gaps are exactly what server-side tracking is designed to close.
Now create an event map. This is a simple document (a spreadsheet works perfectly) that lists:
Event name: Use the standard names your ad platforms expect, such as Purchase, Lead, AddToCart, or InitiateCheckout.
Parameters: For each event, note what data you want to pass. Purchases need value, currency, and content IDs at minimum. Lead events need contact identifiers. The richer the parameters, the better your ad platforms can optimize.
Platform destinations: Which platforms need each event? Some events might go to Meta only, others to Google and Meta, and others to all three.
Data source: Where does this event originate? Website, CRM, payment processor, or backend system?
Prioritize high-value events first. Purchases and qualified leads have the biggest impact on ad platform optimization, so get those right before expanding to micro-conversions. This keeps your initial setup manageable and ensures the most important signals are flowing accurately before you scale.
Finally, note your deduplication strategy. If you plan to keep your browser pixel active alongside CAPI (which is recommended for redundancy), both can fire for the same event. You will need a plan for handling this, which we will cover in Step 4. For now, just flag it in your event map so it is on your radar.
With your event map in hand, the next decision is how you are going to send those events server-side. There are three main paths, and the right one depends on your technical resources and the number of platforms you are tracking.
Direct API integration: This means writing custom code that sends HTTP requests directly to each ad platform's API endpoint. It gives you the most control but requires developer resources. You will be handling authentication, error handling, retry logic, and maintenance for each platform separately. This approach makes sense for engineering teams with the bandwidth to build and maintain it.
Partner integration or attribution platform: Platforms like Cometly handle multi-platform server-side tracking from a single integration. Instead of configuring Meta CAPI, Google server-side tagging, and TikTok Events API separately, you connect once and the platform routes enriched events to all your ad platforms automatically. This is the most practical option for most marketing teams because it removes the engineering burden and keeps everything in one place.
Google Tag Manager server-side container: GTM's server-side container lets you route events through a server you control, then forward them to multiple destinations using GTM tags. It requires setting up a tagging server (hosted on Google Cloud or a third-party provider) and configuring individual tags for each platform. It is a solid middle ground if your team is already comfortable with GTM.
Once you have chosen your approach, gather the credentials you need for each platform. Comparing the available options can help you decide which path is right for your team, so reviewing the best server side tracking tools is a worthwhile first step.
For Meta Conversions API: Go to Events Manager in your Meta Business Manager. Select your pixel, navigate to Settings, and generate an access token. Note your Pixel ID. If you have not set up a Business Manager yet, do that first since it is required for API access.
For Google Ads server-side: Create a server-side GTM container in your GTM account. Set up a tagging server through Google Cloud (App Engine or Cloud Run) or use a third-party hosting provider. Link your Google Ads account and configure your conversion actions to receive server-side events.
For TikTok Events API: In TikTok Ads Manager, navigate to Assets, then Events. Select your pixel and find the Events API section to generate your access token. Note your Pixel ID alongside the token.
Store these credentials securely. They give direct access to your ad platform accounts, so treat them like passwords. Use environment variables or a secrets manager rather than hardcoding them anywhere.
This is where the actual infrastructure comes together. Your server-side endpoint is the layer that sits between your website (and other data sources) and the ad platform APIs. When a user takes an action on your site, that event gets captured, enriched with user data, and forwarded to your ad platforms from the server.
If you are using an attribution platform like Cometly, this step largely involves installing a tracking script and connecting your data sources through the platform's interface. The server infrastructure is managed for you. If you are building a custom setup or using GTM server-side, you will need to provision and configure the server yourself.
Either way, the core configuration tasks are the same.
Connect your website: Your site needs to send event data to your server-side endpoint when user actions occur. This typically involves a small JavaScript snippet or a first-party cookie setup that captures the event and user context, then sends it to your server rather than (or in addition to) the browser pixel. The key is capturing this data before the browser has a chance to block or lose it.
Connect your CRM or backend: This is where server-side tracking really earns its value over pixel-only setups. Your CRM knows things the browser never will: whether a lead became a qualified opportunity, whether a trial converted to a paid account, whether a customer churned or renewed. By connecting your CRM or backend system to your server-side pipeline, you can send these downstream conversion events to your ad platforms, giving them a much more accurate picture of which campaigns are actually driving revenue. If you need guidance on connecting your CRM, our guide on how to track offline conversions covers the process in detail.
Pass user-matching parameters: This is the most technically important part of the configuration. Ad platforms need to match your server-side events to real users in their systems. The parameters that enable this matching include hashed email address, hashed phone number, IP address, user agent, and click IDs such as fbclid for Meta, gclid for Google, and ttclid for TikTok.
Click IDs are especially valuable because they are deterministic. When a user clicks your ad, the platform appends its click ID to the URL. If you capture that ID on landing and pass it back with your conversion event, the platform can match the conversion to the exact click with high confidence. Make sure your landing pages are capturing and storing these click IDs in a first-party cookie so they are available when a conversion happens later in the session.
Event Match Quality (EMQ) in Meta's Events Manager is a direct reflection of how well you are passing these parameters. A higher EMQ score means Meta can attribute more of your conversions to the right users, which directly improves how well your campaigns optimize. Aim to pass as many matching parameters as possible on every event.
Here is a step that many marketers skip and then wonder why their conversion numbers look inflated: deduplication.
The recommended setup for server-side tracking is to keep your browser pixel running alongside the Conversion API, not replace one with the other. The pixel handles fast, client-side event capture. The CAPI handles reliable, server-side event delivery. Together, they provide redundancy so that even if one method fails, the other catches the event.
The problem is that both can fire for the same conversion, and without deduplication, your ad platform counts it twice. A customer who purchases once shows up as two purchases. Your reported ROAS looks great. Your actual results do not match. This is a real issue that distorts optimization and reporting.
The solution is a shared event ID. Here is how it works: when a conversion event occurs, you generate a unique identifier on the client side, before either the pixel or the server event fires. This same event_id is passed with both the pixel event and the server-side event. When Meta, Google, or TikTok receives two events with the same event_id and event_name within a short window, they recognize them as duplicates and count only one.
Generating this ID can be as simple as creating a UUID (universally unique identifier) in JavaScript at the moment of conversion. Something like a timestamp combined with a random string works well. The critical requirement is that it is unique per event occurrence and shared between both the pixel and server calls. If you are running into issues where your pixel is not registering events correctly alongside CAPI, our guide on tracking pixel firing issues can help you troubleshoot.
Meta's deduplication logic: Meta deduplicates using a combination of event_id and event_name. Both must match for Meta to merge the two events. Make sure your pixel event and server event use exactly the same event name (Purchase, not purchase or PURCHASE).
Google's approach: Google's server-side GTM setup handles deduplication through its own mechanisms, but passing consistent transaction IDs and conversion identifiers helps ensure clean data.
If you are using a platform like Cometly, deduplication is handled automatically. The platform generates and manages event IDs across browser and server events, which removes one of the most error-prone parts of a manual CAPI setup.
You have configured your endpoint, connected your data sources, and implemented deduplication. Now you need to verify that everything is actually working before you trust this data for campaign optimization.
Testing is not optional. A misconfigured server-side setup that sends incomplete or malformed events can actually hurt your ad platform optimization more than no CAPI at all, because the algorithms are making decisions based on bad signals.
Testing Meta Conversions API: In Events Manager, navigate to your pixel and open the Test Events tab. You will find a test event code that you can add to your server-side requests to route them to the test environment. Trigger a real conversion on your site (or send a manual test event through your endpoint) and watch the events appear in real time. For a deeper walkthrough of Meta's testing workflow, our Conversion API implementation tutorial covers the process step by step. Verify that all expected parameters are present and formatted correctly. Hashed values should be lowercase SHA-256 hashes. Click IDs should be the raw values from the URL, not modified.
Testing Google server-side: Use GTM's server-side preview mode to inspect events as they pass through your tagging server. You can see exactly what data is being received and what each tag is forwarding to Google Ads. Follow up in Google Ads conversion diagnostics to confirm that conversions are being received and attributed correctly.
Check your Event Match Quality score: After sending test events through Meta, check the EMQ score in Events Manager. This score reflects how well your user-matching parameters are performing. A score of Good or Great means Meta can reliably attribute your events to the right users. If your score is Poor or Fair, review which parameters you are missing and add them. Email and phone are typically the highest-impact parameters after click IDs.
Compare against your backend records: Pull your actual conversion counts from your backend or CRM for a specific time period and compare them against what your server-side setup is reporting. The numbers should be close. Significant discrepancies indicate that some events are not being captured or that deduplication is not working as expected. If you notice that Google Analytics is missing conversions, that is another signal your browser-side tracking has gaps that CAPI should be filling.
Set up ongoing monitoring: Testing once at setup is not enough. Create alerts for sudden drops in event volume, which can indicate a broken integration. Check your EMQ score weekly. Review your attribution data regularly to catch drift before it affects campaign performance. A server-side setup that worked perfectly at launch can break when your website is updated or when an API version is deprecated.
Getting your Conversion API setup live and validated is a significant milestone. But the real value comes from what you do next: enriching your data and expanding your tracking to give ad platforms the richest possible optimization signals.
Enrich your events with additional parameters: Beyond the standard required fields, consider passing customer lifetime value, product categories, lead scores, or subscription tier information with your conversion events. This gives ad platform algorithms more context about the quality of each conversion, not just the fact that it happened. An ad platform that knows your highest-value customers tend to convert on certain product categories can optimize toward finding more of them.
Track the full funnel server-side: Many marketers start by moving only their purchase event to server-side tracking. That is a good start, but the full funnel tells a richer story. Add to cart, initiate checkout, lead form starts, and other micro-conversions all contribute to the optimization signals that ad platforms use to find likely converters. When these mid-funnel events are tracked server-side, they are more reliable and feed better data into lookalike audience building. Understanding attribution modeling helps you determine how credit is distributed across these touchpoints.
Build better custom and lookalike audiences: The audiences you create from server-side conversion data are more complete than those built from pixel data alone. Pixel-based audiences miss users whose conversions were blocked or lost in transit. Server-side audiences capture more of your actual converters, which means your lookalike audiences are modeled on a more accurate representation of your customer base.
Feed ad platform AI better data: This is the compounding benefit of a well-configured CAPI setup. Ad platforms like Meta and Google use machine learning to optimize bidding, targeting, and creative delivery. The quality of that machine learning depends directly on the quality of the conversion data you feed it. Enriched, server-side conversion data gives these algorithms more accurate signals, which leads to better targeting, more efficient spend, and lower cost per acquisition over time. For a broader look at how to leverage this data across channels, our guide on performance marketing attribution covers the full picture.
Cometly's Conversion Sync feature automates this entire process. It takes the enriched conversion events flowing through your server-side setup and sends them back to Meta, Google, and other platforms in the format each algorithm expects. Instead of manually managing event forwarding for each platform, Conversion Sync keeps your ad platform algorithms continuously optimized with the most accurate, complete data available. Combined with Cometly's multi-touch attribution, you get a clear view of which touchpoints are actually driving revenue, not just which ones happened to fire a pixel event.
With your Conversion API setup complete, you now have a tracking foundation that does not depend on browsers cooperating. Your conversion data flows directly from your server to ad platforms, giving their algorithms the accurate signals they need to find your best customers and optimize your campaigns effectively.
Before you consider this setup production-ready, run through this checklist:
Event map completed: You have documented every conversion event, its parameters, and which platforms need it, with high-value events prioritized.
Credentials gathered: You have generated and securely stored access tokens and Pixel IDs for every ad platform in your setup.
Server-side endpoint live: Your endpoint is receiving events and forwarding them with complete user-matching parameters including hashed email, phone, IP address, user agent, and click IDs.
CRM or backend connected: Offline and downstream conversions are flowing through your server-side pipeline, not just website events.
Deduplication configured: Shared event IDs are being generated and passed with both pixel and server events so platforms can merge duplicates.
Events tested and validated: You have used each platform's diagnostic tools to confirm events are arriving correctly with all expected parameters.
Event Match Quality reviewed: Your Meta EMQ score is at Good or Great, and you have a plan to improve it if it is not.
Monitoring in place: You have alerts set up for event volume drops and a regular cadence for reviewing match quality and attribution data.
If you want to skip the manual configuration across multiple platforms, Cometly handles server-side tracking, multi-touch attribution, and conversion syncing from a single platform. You get accurate data flowing to every ad platform, AI-powered recommendations for scaling what is working, and a clear view of the entire customer journey without the complexity of managing each API integration separately. Get your free demo today and start capturing every touchpoint to maximize your conversions.