Conversion Tracking: How Do You Set Up GA4, the Meta Pixel and Conversions API Together?

Accurate conversion tracking is essential to see what your ad spend returns. We explain how to set up GA4, Google Tag Manager, the Meta Pixel and Conversions API together, and what to watch out for.

Advertising is easy; knowing whether an ad works requires accurate measurement. Was a form submitted, was the WhatsApp button clicked, did a purchase happen? When these events are not counted correctly, nobody knows which campaign creates value and the budget goes to the wrong place. In this article we explain step by step how to set up Google Analytics 4 (GA4), Google Tag Manager, the Meta Pixel and Conversions API together. Platform interfaces may change over time; terms may look different depending on the version.

First, a measurement plan

Before setting up any tool, answer this question in writing: what is “success” for this site? Examples:

  • Form submissions (contact, quote)
  • Clicks on the phone number
  • Clicks on the WhatsApp button
  • Booking an appointment
  • Add to cart, begin checkout, purchase
  • Downloading a catalogue or file

Write the name of each event, the moment it fires and the information it carries (amount, product, source) into a table. This is called a measurement plan. Tracking set up without a plan often contains gaps or double counting.

The roles of the tools

  • Google Tag Manager (GTM): lets you manage tracking codes from one place. Instead of adding each code to the site one by one, you add GTM once and manage the other tags from its panel.
  • GA4: measures the behaviour of users who visit your site and conversions. In GA4, important events are marked as “key events”. Their former name was “conversions”; you may see both terms on screen.
  • Meta Pixel: the browser-based code that lets Meta ads (Facebook, Instagram) track events on your site.
  • Conversions API (CAPI): sends the same events to Meta from the server instead of the browser. It helps recover some of the events lost because of browser blocking, cookie restrictions and ad blockers.
  • Google Ads conversion tracking: reports conversions to Google Ads so it can optimise campaign performance and automated bidding.

Step-by-step setup

1. Install Google Tag Manager

Create a GTM account and container and add the code provided to every page of your site. Instead of publishing changes directly, test them in preview mode.

2. Add GA4 through GTM

Create a GA4 property and connect its measurement ID in GTM with a GA4 configuration tag. Then define custom events (such as generate_lead, whatsapp_click, phone_click) with triggers and event tags. GA4’s enhanced measurement setting for form interactions can collect an event called form_submit automatically; if you also count the same submission as a custom event with the same name, double counting can occur. Choose a single method for each form and mark only one of them as a key event. Writing event names consistently and in lowercase makes reporting easier later.

3. Mark important events as key events

In GA4, mark as key events only the events that carry real business value. Marking every event clutters the reports; mark only real goals such as form submissions and purchases.

4. Add the Meta Pixel

Add the Pixel through GTM or through your e-commerce platform’s native integration. Use standard events such as PageView, ViewContent, AddToCart, InitiateCheckout, Purchase and Lead. Standard event names work better with Meta’s optimisation systems. Do not forget to send the amount and currency with the purchase event.

5. Set up Conversions API

CAPI can be set up in several ways: the e-commerce platform’s ready-made connection, a GTM server-side container or sending directly from your own server. Which one suits you depends on your infrastructure and needs. The basic logic is the same: the same event is sent both from the browser (Pixel) and from the server (CAPI).

6. Deduplicate events

When the same event is sent through both the Pixel and CAPI, Meta must not count it as two separate events. For this, a shared event ID (event_id) and the same event name are added to each event. If deduplication is not done correctly, conversions appear twice and optimisation breaks. This is one of the most common setup mistakes.

7. Connect Google Ads conversions

Add the Google Ads conversion tag to GTM or import GA4 key events into Google Ads. If possible, consider enhanced conversions (matching with hashed email and phone data); this can improve measurement. Do not neglect the consent and information requirements for processing personal data.

8. Set UTM rules

Add consistent UTM tags (utm_source, utm_medium, utm_campaign) to ad links. Put the naming convention in writing; “Facebook”, “facebook” and “fb” show up as different sources and spoil the report.

Cookie consent and privacy law

In Türkiye, the personal data protection law (KVKK), and for EU visitors the GDPR, may require information and, in some cases, explicit consent for cookies and tracking technologies. On the technical side, this corresponds to a cookie consent management tool. Which tags run when consent is not given should be configured in GTM. Features such as Google’s Consent Mode may allow limited, anonymous measurement when consent is not given. This is not legal advice; decide on the right configuration together with your legal adviser.

Testing and verification

Half of the setup is testing.

  1. GTM preview mode: see that tags fire at the right moment.
  2. GA4 DebugView: check that events and parameters arrive.
  3. Meta Events Manager: see that Pixel and CAPI events arrive and are deduplicated, and check event match quality.
  4. A real scenario test: submit a real form or place a test order on the site and verify that a single event is recorded on each platform.
  5. Double counting check: see whether the same conversion is counted more than once.
  6. Tests with ad blockers and without consent: observe the behaviour under different browser conditions.

Why do the numbers not match?

GA4, Meta and Google Ads may count the same conversion differently. The reasons:

  • Different attribution models: each platform tends to attribute the conversion to its own ad.
  • Different time windows: post-click and post-view windows differ.
  • Browser blocking: some events do not reach some platforms.
  • Cookie consent: users who do not give consent may not be measured.
  • Timing: is the conversion recorded on the day of the click or the day it happened?

So instead of expecting the numbers to match exactly, monitor large deviations and trends. A large deviation is often a sign of a setup error. Use your real sales data (accounting, order system) as the reference point.

Common mistakes

  • Setting up without a tracking plan.
  • Counting every page view as a conversion.
  • Not deduplicating Pixel and CAPI events.
  • Counting every visit to the thank-you page as a conversion (it is counted again when the page is refreshed).
  • Not excluding test data and your own traffic.
  • Never configuring tag behaviour for cookie consent.
  • Never checking again after setup; site updates can break tracking.

Regular checks

Tracking is not set up once and left. Theme updates, new plugins or page changes can break tags. Prepare a simple list for monthly checks: are the main events working, are the numbers consistent with the previous period, are there error warnings on the platforms?

Conclusion

Accurate conversion tracking starts with a measurement plan, is organised with GTM, is connected consistently to GA4 and the ad platforms, is completed by deduplicating the Pixel and Conversions API and is verified by testing. Cookie consent and personal data also need to be considered from the start. Ad optimisation done without this foundation is guesswork. To decide which platform to start with, see our Google Ads and Meta comparison. If you would like to review your site’s tracking setup or build it from scratch, get in touch with us.

All articles Contact us

Projects delivered with this service

WebsitesSEO

metadiag.com

Metadiag | Advanced Diagnostics & AI for Vehicle Safety

More articles

WhatsApp