Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

Conversion Tracking: The Complete Guide to GA4, Google Ads and Meta Setup

Conversion tracking explained: which conversions to track, step-by-step setup in GA4, Google Ads and Meta, consent mode, attribution and the mistakes to avoid.

Published on
19/10/2026
Updated on
19/10/2026
Reading time
16 min
Conversion Tracking: The Complete Guide to GA4, Google Ads and Meta Setup

Tools

On this page

In short

conversion tracking records the actions that matter to your business (purchases, leads, sign-ups, calls) and links each one to the channel, campaign or page that produced it. A reliable setup has five parts: a short list of defined conversions with a value, one tag deployed on every page (Google tag or Google Tag Manager), key events in GA4, conversion actions in Google Ads and Meta with first-party data (enhanced conversions, Conversions API), and consent handled through consent mode. Test every event before you let an ad platform bid on it.

Want to go further? Ask

Quick quiz

Which way of measuring your marketing fits you?

Question 1 of 425%
What do you want to know first?

Without conversion tracking, marketing reports stop at clicks and sessions, and budgets get allocated on gut feeling. With it, you know which keyword, ad, article or AI referral produces revenue. The vocabulary changed recently: Google Analytics now calls important events key events, and reserves the word "conversion" for actions used by Google Ads. This guide covers the full chain, from choosing what to track to reading the numbers without being fooled by them.

What is conversion tracking?

Conversion tracking is the measurement of completed actions against a goal. A piece of code (a JavaScript tag, a pixel or a server-side call) fires when a visitor completes the action, sends an event with its details (name, value, currency, order ID) to an analytics or advertising platform, and the platform attributes the event to the traffic source that led to it.

It answers three questions that traffic alone cannot answer: which channels generate results, how much each result costs, and where visitors drop out before converting. It is the foundation of every marketing analytics practice and the starting point of conversion rate optimization: you cannot improve a rate you do not measure.

Which conversions should you track?

Track few conversions, well defined. Most sites need one or two primary conversions and a handful of secondary signals.

TypeExamplesWhere it is measuredUse
Macro conversionPurchase, demo request, paid subscription, quote requestGA4 key event, Google Ads and Meta primary conversionBidding, ROI, revenue reporting
Micro conversionAdd to cart, newsletter sign-up, pricing page view, video playedGA4 key event or simple eventDiagnosing the funnel, early signals for low-volume accounts
Offline conversionSigned contract, phone sale, in-store purchaseCRM, imported into Google Ads or sent to Meta from the serverOptimizing ads on real revenue, not on form fills
Engagement signalScroll depth, file download, outbound clickGA4 enhanced measurementContent analysis only, never a bidding target

Give each macro conversion a value: the order amount for e-commerce, or an estimated lead value for B2B (average deal size multiplied by the lead-to-customer rate). With values, platforms can optimize for revenue, and tools like a ROAS calculator become meaningful. To check your current baseline, run the numbers through a conversion rate calculator.

How do you set up conversion tracking, step by step?

1. Write a measurement plan

List each conversion, its trigger (thank-you page, button click, server confirmation), its value, and the platforms that must receive it. Name events consistently (for example generate_lead, purchase, sign_up, which are recommended GA4 event names). This one-page document prevents most duplicates later.

2. Deploy one tag on every page

Install the Google tag directly, or deploy Google Tag Manager, which lets you add Google Ads, Meta and other tags without editing the site code each time. Fire conversion events on the confirmation of the action (an order confirmation, a successful form submission), not on the button click, which also counts failed attempts.

3. Mark key events in GA4

In Google Analytics 4, every interaction is an event. Open Admin, then Key events, and mark the events that represent business results. Check them in DebugView first: a wrong parameter at this stage propagates to every report. If you also use GA4 for organic search, our guide to Google Analytics for SEO shows how to read key events by landing page.

4. Create conversion actions in Google Ads

Two options: import GA4 key events into Google Ads (simple, one source of truth), or use the native Google Ads conversion tag (faster attribution, better for bidding). Choose one per action, never both as primary. Then turn on enhanced conversions: the tag sends first-party data such as an email address, normalized and hashed with SHA256, which Google matches with signed-in accounts to recover conversions that cookies miss. The variant "enhanced conversions for leads" matches offline sales back to the original click. Our guide to Google Ads covers campaign structure around these actions.

5. Add the Meta Pixel and the Conversions API

The Meta Pixel tracks in the browser; the Conversions API sends the same events from your server, CRM or platform, which survives ad blockers and browser restrictions. Meta recommends running both (a "redundant setup"). In that case, send the same event name and the same event ID through both channels: Meta deduplicates the pair when both match within 48 hours. Without a shared event ID, every purchase counts twice.

Emails, social posts, partner links and QR codes carry no reliable referrer. Add UTM parameters (source, medium, campaign) with a UTM builder, with a fixed naming convention, otherwise the conversions land in "direct" or "unassigned".

7. Test before trusting

Complete a real conversion yourself and follow it through GA4 DebugView, Google Tag Assistant and Meta's Test Events tool. Check the value, the currency, the count (one per order) and the source. Repeat the test after every site release: theme updates and checkout changes break tags silently.

How do you set up GA4 ecommerce tracking?

GA4 ecommerce tracking relies on a set of recommended events, from view_item to purchase, each carrying an items array that describes the products. Start with purchase, sent with a transaction ID, a value, a currency and the items, then add the funnel events to see where shoppers drop out. Most store platforms send these events through an official integration; on a custom site, you push them yourself with the Google tag or Tag Manager.

The events that matter

EventFire it whenMain parameters
view_item_listA category or search results page loadsitems
view_itemA product page loadscurrency, value, items
add_to_cartA product is added to the basketcurrency, value, items
begin_checkoutThe checkout openscurrency, value, items
add_payment_infoThe shopper submits a payment methodcurrency, value, items
purchaseThe order confirmation loadstransaction_id, value, currency, items
refundAn order is refunded in your back officetransaction_id, value, currency

Google's ecommerce developer guide sets the rules: each item needs at least an item_id or an item_name, the items array accepts up to 200 elements, and currency must be set at event level whenever you send a value. A minimal purchase looks like this:

gtag('event', 'purchase', {
  transaction_id: 'T-10482',
  value: 64.00,
  tax: 3.20,
  shipping: 4.90,
  currency: 'EUR',
  items: [{
    item_id: 'SKU_123',
    item_name: 'Trail running sock',
    price: 32.00,
    quantity: 2
  }]
});

Rules that keep revenue accurate

  • One unique transaction ID per order. Google Analytics deduplicates purchase events that share a transaction ID for the same user, so a reloaded confirmation page counts once. Never send an empty string: every purchase with an empty ID is then treated as a duplicate, and your revenue collapses.
  • Numbers, not formatted text. Send value and price as numbers with a dot (64.00), never as a formatted string such as 64,00 €.
  • The same product IDs everywhere. Use the product reference (SKU) from your product feed as item_id, so GA4, Google Ads and Merchant Center describe the same products.
  • One source per event. If your store's integration already sends purchase, do not add a second tag. Check in DebugView that each test order produces exactly one event.

Once the events flow, the Monetization reports show revenue by product and where shoppers leave between product view, cart, checkout and purchase. Compare GA4 revenue with your back office every month. Our list of ecommerce KPIs shows which ratios to build from these events, and our guide to Shopify analytics covers the store-side reports to compare them with.

What is the Facebook pixel, and how do you install it?

The Facebook pixel, now called the Meta Pixel, is a small script you add to every page of your site. It sets a cookie in the visitor's browser and reports page views and actions such as leads and purchases to Meta. Meta then links those actions to the ads that were shown, so you can see which ads bring sales and build audiences from people who visited your site.

Meta's base code loads the script. Once it runs, these two calls set your pixel ID and record a page view:

fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');

Which events to send

Standard events describe what the visitor did. Use the names Meta recognizes, because Meta uses them to report results and to optimize ad delivery. Fire each event when the action is complete, not when the button is clicked.

EventFire it when
ViewContentA product or key service page loads
AddToCartAn item is added to the basket
InitiateCheckoutThe checkout page loads
LeadA form is submitted and the confirmation appears
PurchaseThe order confirmation page loads, with value and currency

Send value and an event ID with every purchase

A purchase without a value cannot feed a return on ad spend figure. Send the amount and currency, and pass the order number as the event ID:

fbq('track', 'Purchase', {value: 89.00, currency: 'USD'}, {eventID: 'order-10482'});

If you also send the same purchase from your server, use the same event ID on both sides. Meta then counts the sale once.

Check the pixel before you trust it

Install Meta Pixel Helper, a free browser extension, and open a page on your site. It shows whether the pixel loaded and which events fired. For a full test, open Test Events in Events Manager. It shows browser and server events as they arrive, so you can inspect each parameter of a test order.

Events Manager also shows an Event Match Quality score. It rates how many customer details, such as a hashed email or phone number, you send so Meta can match a conversion to an account. Adding more of these details raises the score.

Common pixel mistakes

MistakeEffectFix
Base code loaded twiceEvery page view counts twiceKeep one copy, ideally through a single tag manager container
Purchase fired on the pay buttonFailed payments are countedFire it on the order confirmation page
Pixel ID from another accountEvents land in the wrong ad accountCopy the ID from Events Manager and check it with Meta Pixel Helper
Pixel loads before consentTracking starts before the visitor agreesBlock it until consent is given, as the consent section below explains

Tip

Compare the Purchase count in Events Manager with your real orders every week. A gap is the early sign of blocked or missing events, and the Conversions API is the usual fix.

To load the pixel without editing the site code each time, see our guide to Google Tag Manager. For how Meta fits into a wider paid and organic plan, read Facebook marketing. For why browsers limit what the pixel can read, see third-party cookies.

How does the Microsoft Ads Conversions API work?

The Microsoft Ads Conversions API sends conversions from your server to Microsoft Advertising, without depending on the visitor's browser. You post events in JSON to an endpoint tied to your UET tag (Universal Event Tracking, Microsoft's tracking tag), and Microsoft matches them to ad clicks through the msclkid click ID and hashed customer details. Microsoft recommends running it alongside the UET tag, with a shared event ID so each sale counts once.

Set it up in five steps

  1. Get the token. In Microsoft Advertising, open the UET section, edit your tag with the pencil icon, click Save and next, select Use Conversions API, then Copy Token. Developers can also retrieve it through the Campaign Management API.
  2. Store the click ID. With auto-tagging on, Microsoft adds msclkid to the landing page URL. Save the latest value in a first-party cookie or on your server (Microsoft suggests keeping it 90 days) and attach it to the lead or the order.
  3. Send the event. Post to https://capi.uet.microsoft.com/v1/{tagId}/events with the header Authorization: Bearer followed by your token. Each event needs an eventType (custom or pageLoad), an eventTime in UNIX seconds within the last 90 days, and a userData object with at least one identifier.
  4. Deduplicate. Use the same tag ID, the same eventName and the same eventId in the UET tag (its event_id parameter) and in the API call. The order number works well.
  5. Read the response. A 200 means the events were accepted; a 400 names the failing event by its index and field. Watch warnings too: an invalid hash is removed and the event is accepted without it, which silently weakens matching.
POST /v1/YOUR_TAG_ID/events HTTP/1.1
Host: capi.uet.microsoft.com
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "data": [{
    "eventType": "custom",
    "eventId": "order-10482",
    "eventName": "purchase",
    "eventTime": 1795600800,
    "adStorageConsent": "G",
    "userData": {
      "msclkid": "dd4afcccb1c94a4cad9544dd7e5006ab",
      "em": "SHA256_OF_THE_NORMALIZED_EMAIL"
    },
    "customData": {
      "transactionId": "order-10482",
      "value": 89.00,
      "currency": "EUR"
    }
  }]
}

Details that change the result

  • Hash identifiers the way Microsoft expects. For an email: trim spaces, remove dots and any +alias from the part before the @, switch to lowercase, then apply SHA-256 in lowercase hexadecimal. For a phone number: international format with the country code (+33612345678), then SHA-256.
  • Pass consent. Events are processed as granted by default. Set adStorageConsent to D when the visitor refused advertising cookies: Microsoft then keeps the event out of attribution and retargeting.
  • Batch with care. A batch holds up to 1000 events, and by default one invalid event rejects the whole batch, unless you set continueOnValidationError to true.
  • Plan the ID Sync pixel for audiences. Remarketing requires a client-side ID Sync pixel whose visitor ID matches the anonymousId you send.

Tip

Use the order number as the event ID on every platform: Google, Meta and Microsoft. One ID per order makes duplicates easy to spot when you compare platform reports with your real sales.

All fields and error codes are in Microsoft's Conversions API guide (Microsoft Learn, updated October 2026). Microsoft also lists server-side Tag Manager as a supported path, so one server container can feed Google, Meta and Microsoft: see our guide to server side tracking. For the campaign side, read our guide to Bing Ads.

Which tool measures what?

ToolWhat it measuresSetupMain limit
GA4Key events from all channels, with source, landing page and pathGoogle tag or Tag Manager, key events in AdminData thresholds and gaps when consent is refused
Google AdsConversions from ad clicks and viewsNative tag or GA4 import, enhanced conversionsCredits only Google Ads interactions
Meta AdsConversions after clicks and views on Facebook and InstagramPixel plus Conversions API, deduplicatedCredit for ad views can inflate results
Google Tag ManagerNothing on its own: deploys and triggers the other tagsOne container on every pageBadly configured triggers create duplicates
CRMQualified leads, signed deals, real revenueStore the click ID (gclid, fbclid) with each leadNeeds an import or API to feed ad platforms

In Europe and in a growing number of jurisdictions, advertising and analytics cookies require consent. Google's consent mode passes the visitor's choice to Google tags through four parameters: ad_storage, analytics_storage, ad_user_data and ad_personalization. Denying ad_user_data also disables the hashed data used by enhanced conversions.

There are two implementations. In basic consent mode, tags stay blocked until the visitor accepts, and nothing is sent if they refuse. In advanced consent mode, tags load with consent denied by default and send cookieless pings, which lets Google model the missing conversions once a data threshold is reached. Either way, you need a consent banner that sends these signals; our comparison of cookie consent software lists the main options. Expect a gap between real sales and tracked conversions: compare tracked revenue with your back-office revenue every month to know its size.

Which attribution model should you use?

Attribution decides which touchpoint gets the credit. Google Ads now supports two models: data-driven, the default for most conversion actions, which splits credit based on your account's history, and last click. According to Google Ads Help, first click, linear, time decay and position-based models are no longer supported, and actions that used them were moved to data-driven.

Keep in mind that every platform counts its own way. Google Ads and Meta each claim the conversions their ads touched, with their own click and view windows, so the sum of platform reports is always higher than your real sales. GA4 offers a neutral cross-channel view, and your CRM holds the truth on revenue. Part of the influence is invisible to all of them: a buyer who read your brand's name in an AI answer, then typed your URL, shows up as direct traffic. This is the problem of zero-click attribution.

How do you set up GA4 cross-domain tracking?

GA4 cross-domain tracking keeps one visitor and one session when someone moves between two of your domains, for example from your main site to a separate shop or booking domain. Install the same Google tag ID on both, then list the domains in GA4's Configure your domains setting: the tag adds a _gl parameter to links between them, which carries the visitor identifier across. Without it, the second domain sees a new visitor referred by the first, and the conversion loses its real source.

The setup

  1. Use the same tag ID (the one starting with G-) from the same web data stream on every page of every domain.
  2. In GA4, open Admin, Data collection and modification, Data streams, select the web stream, then Configure tag settings, Settings, Configure your domains.
  3. Add one condition per domain, for example a condition matching example-shop.com. Conditions combine with OR, you can add up to 100, and you need the Editor role or above.
  4. Save, then click a link from one domain to the other: the destination URL should carry _gl= followed by a long string.
  5. Complete a test conversion on the second domain and check in DebugView or Realtime that the session keeps its original source, not a referral from your own domain.

When you need it

JourneyCross-domain setup?
example.com to example-shop.comYes: two domains, one journey
example.com to shop.example.comUsually not, if every page uses the same tag and one cookie domain. If subdomains use different cookie domains, add them, or self-referrals appear
Your checkout to PayPal or a bank page, then backNo: add the payment domain to the unwanted referrals list, as the next section explains

Why the parameter gets lost

  • Redirects. A redirect on the destination, or a page that rejects unknown query parameters, strips _gl. Configure the redirect to keep it.
  • JavaScript navigation. The tag decorates real link clicks and form submissions. A button that changes the page with JavaScript gets no _gl: replace it with a real link.
  • Blocked click events. Scripts that stop event propagation can prevent the tag from adding the parameter. Test every menu, banner and button that crosses domains, not just one link.

These rules come from Google's help page Set up cross-domain measurement. If you are still deciding where to host a shop or a blog, our comparison of subdomains and subfolders covers the SEO side; staying on one domain also removes this tracking step. For how credit is shared once sessions are stitched together, see marketing attribution.

What mistakes skew conversion data?

  1. Double counting: the GA4 import and the native Google Ads tag both set as primary for the same action, or a Pixel and a Conversions API event without a shared ID.
  2. Thank-you page reloads: a page-view trigger counts each refresh. Use the order ID as a transaction ID so platforms ignore repeats.
  3. Payment gateway self-referrals: a visitor returning from PayPal or a bank's 3-D Secure page gets credited to that domain. Add these domains to the list of unwanted referrals in GA4.
  4. Too many primary conversions: when page views and scrolls are primary, bidding optimizes for cheap, useless actions.
  5. Missing values: without a value, every lead weighs the same and ROAS cannot be calculated.
  6. Internal traffic: your team's test orders and form fills inflate results. Filter internal IP addresses and remove test transactions.
  7. Silent breakage: a new form plugin or checkout step stops the tag. A weekly check of key event counts catches it within days.

Tracking also only measures the destination. If the page that receives the traffic converts poorly, the fix lies in the page; see our guide to building a landing page that converts.

How do you track conversions from SEO and AI?

Organic conversions use the same key events: in GA4, filter on the Organic Search channel and break results down by landing page to see which articles produce leads. Search Console shows clicks and queries, not conversions, so the two tools work together.

Visits from AI assistants have their own channel. GA4's default channel group now includes an AI Assistant channel, for visitors arriving from sources like ChatGPT. That covers AI-referred traffic that keeps its referrer; the rest arrives as direct traffic. Our step-by-step guide to measuring AI citations in Google Analytics shows how to isolate these sessions and their key events.

Because many AI answers mention a brand without sending a click, conversions only tell part of the story. Sorank's SEO and GEO dashboard puts Search Console performance next to your visibility in AI answers, so you can relate organic conversions to the queries and prompts that feed them.

Measure first, then optimize

Conversion tracking is only useful if every number can be trusted: few conversions, real values, one tag, deduplicated events and consent handled properly. Once the data is clean, you can shift budget to what works and grow the channels that cost nothing per click. To see whether ChatGPT, Gemini and Claude recommend your brand before visitors even reach your site, try Sorank's AI mention tracking.

Frequently asked questions

What is the difference between a key event and a conversion in GA4?

In Google Analytics 4, a key event is any event you mark as important to your business, such as a purchase or a lead form submission. A conversion is a key event that is also used in Google Ads to measure and optimize campaigns. You can have more key events in GA4 than conversions in Google Ads, and that is usually the better setup.

How long does conversion data take to appear?

Test events appear within seconds in GA4 DebugView, Google Tag Assistant and Meta's Test Events tool. Standard reports in GA4 and ad platforms usually take several hours and can take up to a day or two to be fully processed. Conversions that happen days after a click are also added retroactively to the date of the click in Google Ads, so recent numbers keep growing for a while.

Can phone calls and offline sales be tracked as conversions?

Yes. Google Ads can count calls from ads and from your website, and it can import offline sales matched to the original click through enhanced conversions for leads or a click ID stored in your CRM. Meta accepts offline events through the Conversions API. The key is to store an identifier (click ID or hashed email) with each lead so the sale can be matched later.

Get your content plan for 30 days for free

We analyse your competitors, your website and your AI visibility to create a tailored content plan for free.

Our free SEO tools

See all our free tools

Get your content plan for 30 days for free

We analyse your competitors, your website and your AI visibility to create a tailored content plan for free.

Man with dark hair and beard wearing a light brown shirt speaks in front of a microphone on a podcast or recording setup.Portrait of a man with short dark hair wearing a white shirt and dark jacket, looking directly at the camera with a neutral expression.Man with short dark hair, beard, and clear glasses wearing a black t-shirt with a white circular logo, standing in front of a stone wall.Celio fabianoSmiling young woman with long brown hair wearing a red top and necklace, outdoors in a tree-filled background.Profile photo of Xavier Breull, Sorank customer
Google
Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.
5/5
+5,000
users

Testimonials from ambitious founders

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.frGoogleE-commerce

0 to 5000 visits in 8 months

Thibault BMsorank.comGoogleSoftware

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.comGoogleLeisure and aviation

0 to 163 clicks in 6 months

Coworking Pariscoworking-paris.frGoogleOffice broker

x92 clicks in 7 months

Guide Zanzibarguidezanzibar.comGoogleTravel