Magento 2 · Google Tag Manager · GA4
Your store starts speaking GA4: fourteen ecommerce events built on the server from the real cart and the real order, never read off the page. Works on Hyvä and Luma, on the standard checkout and on the ones that answer on their own route. The container and the four core events cost nothing.
The Google Tag Manager container plus the four events every shop needs: product page, cart, checkout and purchase. No key to paste: it activates by itself for your domain.
Ten more events, custom dimensions, Google Consent Mode v2 and the recovery of the purchases that never reach Analytics. One payment, one domain, perpetual licence with a year of updates and support.
After the payment you receive, by email, the credentials for the Composer repository and the key for the shopping events.
One licence, one domain, with a year of updates & support included (renew at −35% to keep installing newer releases). The core level keeps working even without the key, so a shop is never left without tracking.
Magento 2.4.x, PHP 8.1 to 8.5, Hyvä or Luma. Installed with Composer, from our repository.
Every event is built on the server from what the shop really has: prices with or without tax as you choose, the attribute you use as the product id, the product categories. Nothing is scraped from the page, so a theme change cannot break it.
view_item — the product pageview_cart — the cartbegin_checkout — the checkoutpurchase — the thank-you page, with the real orderview_item_list — category and search resultsselect_item — a click on a product in a listadd_to_cart and remove_from_cart — the real cart linesearch — the term searched and how many results it gaveadd_to_wishlistadd_shipping_info and add_payment_info — from inside Magento, on any checkoutlogin and sign_upA data layer nobody reads looks like a broken module: until the container has a tag that reads it, nothing reaches Analytics. So a button in the configuration downloads a file to import into Google Tag Manager, with the GA4 configuration tag, the tag that forwards the ecommerce events, the Google Ads purchase conversion carrying the real revenue and the order number, the conversion linker and the variables they need. You import it choosing Merge, look at the preview, publish. The alternative is building some thirty objects by hand.
Roughly one purchase in five never reaches Analytics: an ad blocker, a script that failed, a customer who closes the page too early. Those are sales you made and cannot see, and Google optimises your campaigns without them. With the shopping events the store sends the purchase itself when the browser did not, carrying the identifier that customer had at the time, so the sale lands on the visit and the ad that brought it gets the credit. A panel in the configuration counts them for you: orders, the ones the browser confirmed, the ones the store recovered. And whoever refused to be measured is never recovered.
On a shop we run ourselves: 27 real orders in thirty days, 21 purchases in Analytics. Six sales invisible to the campaigns that paid for them.
In Europe a declared consent state is what lets Google model the conversions it did not observe: without it, that data is simply lost. The module declares everything denied before the container starts — which only whoever loads the container can do — and from there you choose: either it grants consent from Magento's own cookie notice, or it waits for your consent extension to call one public function. A line in the configuration tells you which of the two is really happening, and turns red when the setup cannot work.
Every field and every explanation in the configuration is translated — including the ones that tell you what not to do:
The store view language is picked up automatically; English is the fallback.
Magento 2.4.x (Open Source or Adobe Commerce), PHP 8.1 to 8.5, Hyvä or Luma. A Google Tag Manager container, which is free. For the recovery of lost purchases, a Measurement Protocol API secret from your own GA4 property.
Installation, every field explained, how to import the container and how to check that an event really arrives in Analytics.
What changes, version by version.