Connecting Magento to Google Ads
Magento is self-hosted and endlessly customisable, which means every installation is different and full-page caching is always in the way. Google Ads knows what you spent and which click it came from, and nothing at all about what happened afterwards. The join between them succeeds or fails on one thing: whether the GCLID reaches the Magento order before the conversion happens, because Google Ads can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Magento and Google Ads: the GCLID that Varnish strips
Magento's default Varnish setup strips gclid server-side, so capture the GCLID in JavaScript into a first-party cookie, copy it onto the quote, then the order. Upload to an import conversion action with the increment_id and created_at converted from UTC with an offset. Upload offline-payment orders at invoice, and map credit memos to retractions or restatements.
Magento's default Varnish VCL removes gclid from the request URL so ad clicks do not fragment the cache. The browser still has it in the address bar, but nothing server-side at landing does, so capture the GCLID in JavaScript, set a first-party cookie, and copy it onto the quote at checkout. Check your VCL for the exact parameter list, since custom builds often change it.
From there the order observer stores the GCLID on the order, and an upload runs against an import-type conversion action with the increment_id as order ID and the order's created_at as conversion time. Convert that to the time zone you send, because Magento stores created_at in UTC and a missing offset shifts late-evening orders into the next day.
Order status decides what gets uploaded. Orders placed with offline payment methods sit at pending until paid, and uploading them at placement counts orders that never settle; upload at invoice instead, or restate later. Credit memos map onto conversion adjustments against the same order ID: a full credit memo as a retraction, a partial one as a restatement. If the Google tag also records the purchase on the success page, keep that action secondary so the order does not count twice.
Magento → Google Ads · what breaks
Why this join usually fails — Magento → Google Ads
- 01
The GCLID never reaches Magento
Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.
- 02
Full-page cache between the visitor and your code
The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.
- 03
The conversion action is the wrong type
Uploads against a standard website conversion action fail. The action has to be created as 'Import' — and existing actions cannot be converted, so this is discovered late and requires starting a new action with no history.
- 04
Nothing reconciles afterwards
Google Ads reports uploads in Goals → Conversions → Uploads, with rows accepted and rows failed. A green result means the file parsed, not that the clicks matched. The number to watch is how many conversions actually appear against campaigns afterwards.
Magento → Google Ads · the fix
What working looks like — Magento → Google Ads
The GCLID on every order
Conversions arriving in Google Ads
Conversions appear against the campaign, ad group and keyword that produced the click, with the value you sent — which is what lets Smart Bidding optimize toward revenue instead of toward form fills.
Reconciled against the source
Magento → Google Ads · architecture
How Magento and Google Ads actually connect
- 1
Magento holds the truth
You own the database, so the truth is as good as the query. Pin down which order statuses count as revenue — processing, complete, or both — because that choice moves the number substantially.
- 2
Google Ads needs a click to match
Google Ads matches an uploaded conversion back to a click using the GCLID. The conversion action must be created as an import type — an upload against a website-tag conversion action is rejected. Uploads must also land inside Google's window: the click has to be within the last 90 days.
- 3
The identifier is the bridge
The GCLID, captured at the visit and carried into the Magento order.
- 4
The event source decides reliability
Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.
- 5
Deduplication at the destination
Google deduplicates on the combination of GCLID, conversion action and conversion time. Uploading the same click twice against the same action at the same timestamp is rejected rather than double-counted, but uploading it against a second conversion action counts twice — which is how most double-counting here actually happens.
Magento → Google Ads · normal or broken
Working vs. broken, side by side — Magento → Google Ads
Normal, not a fault
The GCLID present on the order
Sent from the Magento order placement observer
Deduplicated correctly
Google deduplicates on the combination of GCLID, conversion action and conversion time. Uploading the same click twice against the same action at the same timestamp is rejected rather than double-counted, but uploading it against a second conversion action counts twice — which is how most double-counting here actually happens.
Reconciles with the source
Actually broken
The GCLID missing on most records
Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.
Sent from the browser
The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.
Counted twice, or not at all
Uploads against a standard website conversion action fail. The action has to be created as 'Import' — and existing actions cannot be converted, so this is discovered late and requires starting a new action with no history.
Nobody has reconciled it
Magento → Google Ads · diagnose
Diagnostic order — Magento → Google Ads
- 01
Count orders carrying the GCLID
- 02
Follow one real conversion end to end
- 03
Place a test order as an anonymous visitor through cache
Not as an admin, which bypasses it. If the order data is missing on the cached path, caching is your cause.
- 04
Check the conversion action type and the upload diagnostics
In Google Ads, Goals → Conversions → Uploads shows every upload with its error rows. Read the errors rather than the success count; a file can import successfully with most rows rejected.
- 05
Read the match rate, not the success message
Google Ads reports uploads in Goals → Conversions → Uploads, with rows accepted and rows failed. A green result means the file parsed, not that the clicks matched. The number to watch is how many conversions actually appear against campaigns afterwards.
Magento → Google Ads · prove
How it gets proven — Magento → Google Ads
Source of truth
Magento's sales order records in your own database, for the same window and order status set.
- The GCLID confirmed present on a live order.
- The Uploads diagnostics read row by row, with the accepted count reconciled against conversions appearing in campaign reporting.
- Order data confirmed populated on an order placed through a fully warmed cache.
Magento → Google Ads · free audit
What we check in the free audit
- Count orders carrying the GCLID
- Follow one real conversion end to end
- Place a test order as an anonymous visitor through cache
- Check the conversion action type and the upload diagnostics
- Read the match rate, not the success message
Checked against
Magento's sales order records in your own database, for the same window and order status set.
Free30 minutesNo obligation
Magento → Google Ads · when not to buy
When you don't need this — Magento → Google Ads
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the GCLID.
- If your Magento build has heavy customisation by another team, scope their availability first — the build is usually blocked there.
- If your sales close inside a few days and your website tag already reports accurately, you may not need offline import at all. It exists to solve the delay between click and revenue.
Magento → Google Ads · what we deliver
What gets built — Magento → Google Ads
Identifier capture into Magento
Capture the identifier and persist it as order data through an observer on order placement, server-side, so it never depends on what the cache served.
Event source: the Magento order placement observer
Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.
Dispatch to Google Ads
Offline Conversion Import through the Google Ads API, or a scheduled upload. Enhanced conversions for leads where GCLID coverage is poor and you have consented email addresses.
Reversals where they exist
Credit memos are recorded against the original order and should reduce the reported figure.
Written guarantee
95%+ tracking accuracy
Measured against Magento's sales order records in your own database, for the same window and order status set.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Magento → Google Ads questions, answered
Often because Varnish strips gclid before the request reaches Magento. Capture it in the browser and store it on the quote instead of relying on server-side request parameters.
Upload a conversion adjustment against the original order ID: a retraction for a full refund, a restatement with the new value for a partial one.
Almost always because the GCLID never reached the Magento order. Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one. Measure coverage before debugging the dispatch.
The GCLID — the click ID Google appends to your landing page URL when auto-tagging is on. For iOS App campaigns and some Shopping traffic you will see GBRAID or WBRAID instead, and those behave differently: WBRAID cannot be used with user-provided data in the same way, and neither joins to an individual user. Enhanced conversions for leads is the alternative path, matching on hashed email or phone rather than a click ID, and it is the right choice when GCLID coverage is poor.
The Magento order placement observer. Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.
Google Ads reports uploads in Goals → Conversions → Uploads, with rows accepted and rows failed. A green result means the file parsed, not that the clicks matched. The number to watch is how many conversions actually appear against campaigns afterwards.
More on Magento → Google Ads
- Google Ads · Lead → booked callHow to track lead to booked call for Google Ads
- Google Ads · Booked call → closed wonHow to track booked call to closed won for Google Ads
- Google Ads · Free trial → paidHow to track free trial to paid for Google Ads
RELATED GUIDES
Where Magento → Google Ads fits in the rest of your tracking
- Google Ads · BeautyGoogle Ads conversion tracking for beauty brands
- Google Ads · FashionGoogle Ads conversion tracking for fashion brands
- Google Ads × Ecommerce OrdersHow to reconcile Google Ads against your store's order table
- Google Ads · Add to cart → purchaseHow to track add to cart to purchase for Google Ads
- BigCommerce → Google AdsConnecting BigCommerce to Google Ads
- Magento → Apple Search AdsConnecting Magento to Apple Search Ads
- FashionConversion tracking for fashion brands, reported net of returns
- EDD → Google AdsConnecting Easy Digital Downloads to Google Ads
Free · 30 min
Get Magento and Google Ads joined properly
Free30 minutesNo obligation
