Cookieless measurement: how to set up server-side tracking and first-party data
If the sales count in your ad dashboard doesn't match your store, the problem is often measurement, not the ads. This post walks step by step through server-side tracking, Meta's Conversions API, Google's enhanced conversions and consent mode to recover the sales your browser pixel misses.
Many e-commerce brands see the same picture: the store dashboard shows 100 orders, while Meta or Google Ads doesn't show a noticeable share of them at all. Ad algorithms only learn from the sales they can see. When some sales are invisible, campaigns drift toward the wrong audiences, ads that work well look bad, and budget decisions are made with incomplete data. The main reason is that tracking relies heavily on pixels running in the browser. Ad blockers, browser cookie restrictions and users declining cookie consent can all silence those pixels. The fix isn't a single tool; it's supplementing browser data with data sent from a server and with your own customer data (first-party data).
1. Measure the gap first: how many sales are being lost
Before setting anything up, see how big the problem is. Take the order count for the last 30 days from your store dashboard and compare it with the purchase events in Meta Events Manager and the conversions in Google Ads for the same period. Don't expect a one-to-one match, since ad platforms count with their own attribution rules; but if the gap is large or growing over time, your measurement setup is missing sales.
- Compare not only the totals but also by device and browser. If the gap is concentrated in one browser, the cause is most likely cookie restrictions.
- Check that the purchase event is sent with the order value and currency. An inconsistent event does as much damage as a missing one.
- Look for the same sale being counted twice. In new setups, the most common mistake is duplicate data, not missing data.
2. For Meta: set up the Conversions API alongside the pixel
The Conversions API sends sales and other events to Meta directly from your server, e-commerce platform or CRM instead of the browser. Meta recommends using it together with the pixel, not instead of it. This is called a redundant setup: the same event arrives from both the browser and the server, so if one misses it, the other catches it.
To keep the same sale from being counted twice when it arrives through both paths, you need deduplication. The event name must be the same in the pixel and server event, and the same event_id must be sent from both sides. Meta discards a second event with the same ID and name that arrives within 48 hours. Without an event ID, deduplication can also rely on the fbp cookie or external_id, but a shared event ID is the most reliable route.
- Add customer information such as email, phone and name to server events in hashed (one-way encrypted) form. Also send the IP address and browser information (user agent).
- Track the Event Match Quality score in Events Manager. It's scored out of 10 and shows how well an event can be matched to a Meta account. Only matched events can be used for attribution and ad optimization.
- Send events in real time or close to it. Data sent in batches hours later is less valuable for optimization.
3. For Google: enhanced conversions and consent mode
On the Google side, the equivalent is enhanced conversions. Customer information you have at the moment of purchase, such as an email address, is hashed with SHA256, sent to Google and matched with users signed in to a Google account. Google says this supplements your existing conversion tracking and can improve measurement accuracy. It can be set up through the Google tag, Google Tag Manager or server-side Tag Manager.
The second piece is consent mode. It isn't a cookie banner; it passes the consent decision from your existing banner to Google tags. Version 2 added two new consent signals related to advertising data: ad_user_data and ad_personalization. If you sell to the European Economic Area, Google expects you to send these signals.
- In the basic setup, Google tags don't run at all until the user gives consent; without consent, no data is sent.
- In the advanced setup, tags load when the page opens and send cookieless signals if consent is denied. Google can use these signals to model missing conversions and build a more detailed model specific to you.
- Modeling results require at least 7 full days of data and a minimum traffic threshold, so small accounts may not see results right away.
4. Server-side tagging: bring control to your own domain
Server-side Google Tag Manager runs some of your tags on a server you control instead of in the user's browser. The browser first sends data to your own server, and you decide which data goes to which platform and in what form. Google strongly recommends running this server under your own domain (for example, measure.yourbrand.com).
This setup isn't essential for every brand. You need to host a server, maintain it and carry its cost. For a store with low monthly order volume and a single ad channel, the platform's ready-made integrations (for example, the Conversions API and enhanced conversions set up through Shopify apps) are often enough. For brands that send data to several ad platforms and want to manage it from one place, server-side tagging greatly simplifies the setup.
Server-side tracking doesn't replace consent; it's not a way to send data users haven't agreed to.
5. If you use Shopify: manage pixels from one place
In Shopify, tracking code is no longer added inside the theme but in the Customer events section of the admin. Shopify recommends using app pixels where possible, because they're more secure and update automatically. If no suitable app exists, you can add a custom pixel. Custom pixels can also collect data on checkout and post-purchase pages, but the store owner is responsible for consent, code security and updates.
Shopify set August 26, 2026 as the deadline to move the Thank you and Order status pages to the new setup; stores that didn't upgrade were upgraded automatically. If you had tracking code added to these pages the old way, make sure to test that your purchase event still works correctly.
The practical takeaway
Review your measurement setup in this order: first compare store orders with sales in your ad dashboards to see the loss. Then set up the Conversions API for Meta alongside the pixel, with a shared event ID. For Google, turn on enhanced conversions and connect version 2 of consent mode to your cookie banner. If you have several ad channels and enough volume, consider server-side tagging under your own domain. After each step, check for double counting. Ad algorithms can only decide as well as what they can see; giving them complete, consented data often makes more difference than launching a new campaign.
- Meta for Developers — Conversions API
- Meta for Developers — Handling duplicate Pixel and Conversions API events
- Meta for Developers — Conversions API best practices
- Google Ads Help — About enhanced conversions
- Google Ads Help — About consent mode
- Google for Developers — Set up consent mode on websites
- Google for Developers — Introduction to server-side tagging
- Shopify Help Center — Pixels
- Shopify Help Center — Custom pixels
- Shopify Help Center — Upgrading the Thank you and Order status pages
