Most ad accounts I audit have the same hidden problem: the campaigns are optimising on incomplete or duplicated conversion data. Browser tracking gets blocked, events fire twice, and consent is handled as an afterthought. Before spending more on Meta or Google Ads, fix the measurement. Here is the setup I use on client websites.
1. Decide Which Events Actually Matter
Tracking everything creates noise. Pick the few events tied to revenue — a lead form submission, a booked call, a purchase — and make them rock solid. Micro-events like scroll depth can live in analytics, but only real conversions should be sent to ad platforms for optimisation.
2. Browser Pixel + Server-Side Conversions API
Ad blockers, browser privacy features and short cookie lifetimes mean the browser pixel alone misses conversions. Sending the same events from your server through Meta's Conversions API recovers much of that signal, because the server sees every successful form submission or order.
3. Deduplicate With a Shared Event ID
If both the pixel and the server report the same purchase, Meta needs to know it is one conversion, not two. Generate an event ID once, send it with the browser event and the server event, and Meta will deduplicate them.
// One ID shared by the browser pixel and the server event
const eventId = crypto.randomUUID();
fbq("track", "Lead", {}, { eventID: eventId });
await fetch("/api/track", {
method: "POST",
body: JSON.stringify({ event: "Lead", eventId }),
});4. GA4 and Google Ads Conversions via Tag Manager
Push clean events to the data layer from your app and let Google Tag Manager route them to GA4 and Google Ads. Keeping tags in GTM means marketing can adjust conversions without a code deploy, while developers stay in control of the data that is sent.
Mark only your true conversion events as Key Events in GA4 and import those into Google Ads — importing everything confuses Smart Bidding.
5. Respect Consent Without Losing All Your Data
Use a consent banner that actually controls your tags, and implement Google Consent Mode so Google can model conversions for visitors who decline cookies. Load marketing tags only after consent where the law requires it — it protects your clients and keeps your data trustworthy.
Summary & Action Items
Conclusion
Good ad performance starts with good measurement. Once conversions are tracked once, accurately and with consent, Meta and Google's algorithms have the signal they need — and your reports finally match your sales.

Written by Muhammad Sohaib
Full Stack & AI EngineerFull Stack Engineer & UI/UX Designer specializing in Next.js, React, Node.js, and high-performance digital products.


