Google Tag Manager
-
GA4 in Google Tag Manager: events, variables, and purchase verification
27 Nov 2025
With Google Tag Manager (GTM), you can send product views, cart events, and purchases from Abicart to Google Analytics 4 (GA4). GA4 and GTM are available in Go, Plus, and Pro. Start with a connected GTM container and check which events your active theme actually sends, so that the correct data reaches GA4 and the same purchase is not registered twice. Before you beginThis guide is about events and variables, not about installing the same tracking again. GTM-… identifies the GTM container. G-… is a measurement ID for GA4. The fact that an ID is saved in Abicart does not in itself show that the correct container and purchase tag are running. See create and connect a GTM account for the connection and add GA4 for GA4 settings. Theme families and older theme versions can send different structures. Therefore, do not use a specific version number as a guarantee for all themes. Ask support to check the support in your active theme if the events below are missing. Also check the store's consent settings and Google's tag settings. An event in the data layer does not prove consent or delivery to GA4. Map only the parameters required for the current event; do not send the entire data layer object automatically.Do not send email addresses, phone numbers or other directly identifying customer data as ordinary GA4 event parameters, in page URLs or in custom dimensions, even when the customer has consented to tracking. Dedicated user-data features require a separate, correct configuration. Use only one verified purchase flow for the same order and reconcile item value excluding tax and shipping, tax and shipping separately. 1. Read the events in GTM Preview Open the correct container in GTM and start Preview for the store's address. Use the store and theme that are to be measured. View a product, add it to the cart, and open the checkout. Select each event in Tag Assistant and read both Data Layer, Variables and the tags that have fired. Check the event for that specific action. An old value that remains from a previous event should not be used as proof of a new purchase. Only check the purchase step with a planned test flow and a payment environment that you are allowed to use. A real purchase can charge, reserve money, and affect inventory. Event in the data layerWhen it's usedWhat to check view_itemA product page is viewed.Correct product in ecommerce.items, currency, and price basis for the theme. add_to_cartAn item is added to the cart.Which item and quantity the event refers to; do not assume that an order ID already exists. begin_checkoutThe checkout process begins.The cart's contents and value. Check the VAT basis separately from the purchase event. purchaseThe structured purchase event appears on the receipt page in themes with this support.ecommerce.transaction_id, value, tax, shipping and items. purchase_GA4An older purchase flow with separate transaction fields.See the comparison below. The event name does not guarantee a modern ecommerce object. 2. Create variables with the full pathecommerce is an object. ecommerce.items is a list of product objects. Create data layer variables in GTM with the exact path for the event you have checked, for example ecommerce.currency. Do not just use currency when the value is inside the object. PathType and meaning ecommerce.currencyCurrency code, for example SEK. ecommerce.itemsList of items. Send the entire list as the GA4 parameter items. ecommerce.items[].item_id, item_name, price, quantityThe product's identifier, name, unit price, and quantity. [] describes each item in the list; do not enter the square brackets as a GTM path to a single variable. ecommerce.transaction_idUnique order ID as a string for a purchase. Do not create a made-up order ID for a product view. ecommerce.valueItem value for the structured purchase event, excluding VAT and shipping. ecommerce.tax, ecommerce.shippingThe order's VAT amount and its shipping cost excluding VAT, respectively. Both are separate from the item value. ecommerce.totaltransactionValueSupplementary total including VAT in the structured purchase flow. This is not the same value as GA4's value. For product views and beginning checkout, prices may follow different VAT settings than the purchase event. Check the actual event before reusing the same price variable in all tags. Missing fields should be troubleshooted; do not replace a missing order ID or item value with an older value that happens to be in the data layer. 3. Connect the event to a GA4 tag Create the data layer variables you need in GTM. Select Data Layer Variable, enter the full path, and check the value in Preview for the correct event. Create a custom event trigger with the exact event name, for example purchase. Connect it to the intended GA4 event tag and the correct Google tag/measurement ID. Send the parameters that correspond to the event. For purchases, parameters such as transaction_id, currency, value, tax, shipping and items are relevant. Check if the container sends ecommerce data automatically or via manual parameter mappings. Do not let two different purchase tags send the same order. Test in Preview and check the received parameters in GA4's DebugView. Only publish when the result is correct. purchase and the older purchase_GA4 are different data sources The structured purchase event has purchase data in ecommerce. The older purchase_GA4 flow may instead contain transactionId, transactionProducts, currencyCode, cartCost, transactionTotal, transactionTax, transactionShipping, paymentFee and totalIncVat. These are not automatically the same GTM paths as in the table above. If the older flow is used, the mapping needs to be checked specifically: cartCost refers to the item value excluding VAT, while transactionTotal can also include other costs. The product list format also needs to match GA4's items. Standalone fields like articleId, articleNumber, name, articleName, articlePrice and orderItem can appear in older events. They are not necessarily present on every page or event. Do not connect both purchase and purchase_GA4 to separate GA4 purchase tags for the same order. If you need to switch from an older mapping, check existing tags and test the switch before turning off the old flow. Example: check the amountsA simplified test order without a discount or payment fee has two items at SEK 100 each excluding VAT, shipping at SEK 40 excluding VAT, and 25 percent VAT on everything. Then the item value is 200, shipping is 40, VAT is 60, and the total is SEK 300. This illustrates why value should not be set to the entire total including VAT and shipping. Check actual discounts, fees, and VAT rates against your own test order. {"event":"purchase","ecommerce":{"transaction_id":"TEST-1001","currency":"SEK","value":200,"tax":60,"shipping":40,"items":[{"item_id":"TEST-01","item_name":"Testprodukt","price":100,"quantity":2}]}} Also check a reload of the same test receipt. The order should keep the same transaction_id; do not create a new ID per page view. Compare received purchases, not just the number of events in the data layer. Include discounts, multiple VAT rates, shipping, and any payment fees in the test cases. The item value, shipping, VAT, and total are different amounts and must be mapped to the correct parameters. Troubleshoot and check the resultSymptomNext check Wrong or old GTM ID is loadedCheck the correct store, active theme, saved ID, and published container. Investigate duplicate installations and any cache before adding another script. The event exists but the variable is emptySelect the correct event and read the structure there. Check the full path and whether the event uses the modern or older purchase format. GA4 shows too high a value or duplicate purchasesCompare value, VAT basis, and shipping with the order. Check how many purchase tags are firing and that the same unique transaction_id is used for the same order. Nothing reaches GA4First check the data layer, then the trigger, fired tag, measurement ID, consent, and DebugView. A data layer event alone does not prove delivery to GA4. When contacting support: specify the store, active theme, GTM ID, event name, time, and an anonymized example of the missing fields. Do not send customer data or payment data. For Google's recipient format, see Google's guide for GA4 ecommerce. Quick startCheck that the correct GTM container is loaded in the correct store and that the intended container version is published.Follow product → cart → checkout in GTM Preview and read the data layer for each event.Use purchase with its ecommerce object when that structure exists. Do not confuse it with the older event purchase_GA4.Reconcile the order ID, currency, item value, VAT, and shipping against an agreed-upon test order. Check for a single purchase report before publishing changed tags. Subscription and accessGA4 and GTM are available in Go, Plus, and Pro. A connected GTM container, the correct Google account, a supported active theme configuration, and correct consent settings are also required. The guide covers events and variables; it does not replace checking the store's existing tracking.
-
Connect the correct Google Tag Manager container to the store
27 Nov 2025
Gather the store's tags in the correct container and control the measurement without duplicate purchases or conflicting consent settings. This guide is for store administrators and those responsible for measurement. It applies to Diversity themes with the Google add-on in Go, Plus, and Pro. Google Tag Manager requires a Google account and the correct permissions. These instructions should not be used as a general installation guide for older TPL or custom themes that lack these settings. 1. Find an existing account and the correct container First, check if the store already has a GTM container. Ask the responsible agency or colleague for access to it instead of creating a competing installation. Ensure that the store owner has permanent access. Having a Google account does not automatically grant permission to the company's container. In GTM, a container is the collection of tags, triggers, and variables. A tag sends or processes data. A trigger specifies when it should run, and a variable provides, for example, a transaction ID or order value. 2. Create a web container if one is missing Open Google Tag Manager with the company's designated Google account.Create an account if the organization doesn't already have one and create a container with a clear name for the store.Select the target platform Web.Copy the container ID that starts with GTM-. It is not a GA4 ID that starts with G- and not an Ads ID that starts with AW-. 3. Add the ID to the active theme Go to Appearance → Themes. Check which theme and version are active in the current store or sub-store.Open Edit → Add-ons → Google → Google Tag Manager.Enter the GTM ID in the Tag Manager field and save. Do not paste Google's full script block into this ID field.Check for any domain-specific Google settings. A specific ID for the domain can be used instead of the general one. If you change containers, first document the existing ID, tags, consent settings, and measurement responsibilities. A new ID does not automatically move tags and history from the old container. Verify the change in the correct store before it goes live. 4. Configure tags and consent Adding the container ID does not automatically install all desired Analytics, Ads, or other tags. These are configured in GTM with the correct triggers and variables. The Diversity theme's Google flow sets default consent values before Google tags are loaded and updates them when the visitor makes a choice. However, each tag must be correctly configured for its consent requirements. Custom HTML tags and other vendors' scripts do not automatically follow all rules just because they are in GTM. Check if the same GA4 or Ads measurement is also enabled directly in the theme or through another script. Choose one intended path for the same purchase measurement; duplicate installations can result in duplicate events. Server-side tagging is a separate setup and is not created by entering a standard web container's GTM ID here. 5. Check before publishing the GTM version Use Preview in GTM and connect Tag Assistant to the correct domain.Confirm that the correct container is loading and that the correct tags are firing on the intended events.Check without a consent choice, after denial, and after consent. Also check that choices can be changed again.Check purchase measurement, transaction ID, value, and currency with an authorized test flow. Do not count both the older purchase and purchase_GA4 as two different purchases.Publish the reviewed GTM version and check the regular store again. If nothing appears: check the container ID, active theme, correct domain, and the published GTM version. An ad blocker can affect the test; an empty Preview result does not in itself prove a store error. A theme that is only being previewed is not proof that the public store uses the same settings. Quick startReuse the company's existing container or create a Web container.Enter the GTM ID in the correct active theme.Configure tags and consent without duplicate measurement paths.Test in Preview, publish the intended GTM version, and check the store. SubscriptionGo, Plus, and Pro can use the Google extension in themes that support it. The Google account's permissions and the theme's actual features determine if this guide is applicable. Check the active theme again after a theme change.