CMS

Magento GA4 & Ads Conversion Tracking

By Hira Ads Pro·2 min read·October 12, 2026

Magento 2 (Adobe Commerce) stores usually have more moving parts than other platforms: custom themes, third-party checkout modules and full-page caching. Reliable tracking depends on a well-defined ecommerce dataLayer.

1. Choose how the dataLayer is produced

Two common approaches:

  • A GTM extension for Magento that pushes standard GA4 ecommerce events
  • A custom module built by your developer to the same specification

Either way, the output should follow GA4’s ecommerce event names so every platform can use it.

2. The events to cover

EventPage or action
view_item_listCategory and search results
view_itemProduct page
add_to_cartAdd to cart (including mini-cart and AJAX)
begin_checkoutCheckout start
add_shipping_info / add_payment_infoCheckout steps
purchaseOrder success page

3. Get the purchase event right

The purchase event is the one that drives bidding, so it has to be exact:

  • Fire it only on the order success page, once per order
  • Use the order increment ID as transaction_id
  • Decide whether value includes tax and shipping, and keep it the same in every platform
  • Make sure the success page is not served from full-page cache with another customer’s order data
window.dataLayer.push({ ecommerce: null });
window.dataLayer.push({
  event: 'purchase',
  ecommerce: {
    transaction_id: '000001234',
    value: 189.00,
    tax: 31.50,
    shipping: 0,
    currency: 'GBP',
    items: [{ item_id: 'SKU-1', item_name: 'Product', price: 189.00, quantity: 1 }]
  }
});

4. Connect GA4, Google Ads and Meta in GTM

  • GA4 ecommerce tags reading the dataLayer
  • Google Ads purchase conversion with value and transaction ID, plus enhanced conversions
  • Meta Pixel Purchase with value, currency and eventID

Remove any built-in Magento Google Analytics or Google Ads modules that send the same data, or you will double count.

5. Add server-side for reliability

For larger stores, send purchases server-side as well: through server-side GTM or a Conversions API integration. Deduplicate with the order ID as the event ID.

6. Test on staging and production

  • Place test orders with different payment methods
  • Check refunds and cancelled orders are not counted as purchases
  • Compare GA4 revenue with Magento’s sales report weekly

Magento tracking is part of conversion tracking and web analytics.

Want this set up properly on your site?

Request an audit and get a clear plan before any changes are made.

Request an Audit →