Skip to main content

GA4 e-commerce events

ECMS9 sends the Google Analytics 4 e-commerce events from the core. You enter a Measurement ID once; the shop then loads the Google tag and reports product views, cart changes, checkout steps and purchases on every storefront theme — no theme edits, no extra module, no tag-manager setup required.

Where to enter the Measurement ID

Settings → Global settings → Analytics settings, field "ID Google Analytics". Paste the GA4 Measurement ID in the form G-XXXXXXXXXX (found in GA4 under Admin → Data streams → your web stream).

SEO tab with the Google Analytics field

  • Only a valid G-… id is accepted; an old Universal Analytics UA-… code is ignored, and so is an empty field — with no id there is no tag and no events at all.
  • The "Use Enhanced Ecommerce" checkbox next to it is a leftover from Universal Analytics and has no effect on GA4 events.
  • If your theme already carries a Google tag or a GTM container (the page already loads googletagmanager.com), ECMS9 does not insert a second loader, so nothing is counted twice — the events simply flow into the tag that is already there.

Which events fire where

EventPage / actionParameters
view_item_listcategory pageitem_list_id, item_list_name, items (with index)
view_itemproduct cardcurrency, value, items (first variant price)
add_to_cartadding a product to the cart (button or link)items (item_id, quantity)
remove_from_cartremoving from the cartitems
searchsubmitting the site search formsearch_term
view_cart, begin_checkoutopening the cart / checkout pagecurrency, value, items
add_shipping_infochoosing a delivery methodcart + shipping_tier
add_payment_infochoosing a payment methodcart + payment_type
purchasethe "thank you" page, first render onlytransaction_id, currency, value, shipping, items, shipping_tier, payment_type

Notes on the details that owners usually ask about:

  • Currency is reported as UAH.
  • shipping_tier is the visible name of the chosen delivery method as the shopper sees it. For Nova Poshta the chosen service is appended, so you can tell counter, parcel locker and courier apart — e.g. Нова Пошта — Курʼєром. payment_type is the visible name of the payment method. Both are sent again on purchase, so revenue can be compared by carrier and by the way people paid (on purchase the tier is the method name only, without the Nova Poshta service).
  • A change of mind is reported: picking another delivery or payment method fires the event again with the new name; picking the same one twice does not.
  • purchase is sent exactly once — on the first render of the confirmation page right after the order is placed. Refreshing or reopening that page later never re-sends it, so transactions are not double-counted.

Theme-independent by design

The Google tag loader is injected into <head> and the events into one script before </body> by the core rendering pipeline, so every theme — stock or custom — gets them, and they keep working after core updates. The listener that reports cart changes and checkout choices watches the standard cart endpoints and the standard deliveryMethodId / paymentMethodId fields of the checkout form.

For theme developers

If a theme renders delivery or payment options with unusual mark-up, a data-ga-label="…" attribute on the radio/select overrides the text taken from the label, so the name in GA4 is exactly what you want.

How to verify it yourself

  1. Open the storefront in a browser with the Measurement ID saved, open the developer console and type dataLayer. You should see the config call with your G-… id followed by the events for the page — view_item on a product card, view_item_list on a category.
  2. Add a product to the cart, open the cart, pick delivery and payment — add_to_cart, begin_checkout, add_shipping_info (with shipping_tier) and add_payment_info (with payment_type) appear in dataLayer as you go.
  3. Place a test order: the confirmation page pushes purchase with the order number as transaction_id. Read window.dataLayer rather than hooking gtag — the loader redefines gtag and would hide a hook.
  4. In GA4, Admin → DebugView shows the same events live when the browser has the Google Analytics Debugger extension enabled (or the page is loaded with ?debug_mode=1); the standard reports catch up within a day or two.
Nothing in dataLayer?

Check, in this order: the id is saved and starts with G-; the page is not served from a cache made before you saved it (clear the site cache); an ad blocker is not blocking googletagmanager.com in your browser.