ACP2E-5176: Ecommerce events sent to Google Analytics 4 through Google Tag Manager use Universal Analytics format and omit checkout events
The ACP2E-5176 patch fixes the issue where ecommerce events sent to Google Analytics 4 through Google Tag Manager use the Universal Analytics format and omit several checkout events. This patch is available when the Quality Patches Tool (QPT) 1.1.86 is installed. The patch ID is ACP2E-5176. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.10.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.8-p5
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.7 - 2.4.9
magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
Ecommerce events sent to Google Analytics 4 through Google Tag Manager use the Universal Analytics format and omit several checkout events.
Steps to reproduce:
- In the Admin panel, go to Stores > Settings > Configuration > Sales > Google API.
- Expand Google Analytics and make sure Enable is set to No.
- Expand Google GTag > Google Analytics4, clear Use system value, set Enable to Yes and Account type to Google Analytics4, enter a test Measurement ID (for example, G-12345678), and click Save Config.
- Go to System > Tools > Cache Management and click Flush Magento Cache.
- On the Storefront, watch the events pushed to window.dataLayer with the browser developer tools console or an analytics debugger extension.
- Open a product page and click Add to Cart.
- Open the shopping cart page, click Proceed to Checkout, fill in the shipping address, select a shipping method, click Next, and select a payment method.
Expected results:
- Add to Cart sends an add_to_cart event in the GA4 ecommerce format, with the product in the items list.
- The view_cart, begin_checkout, add_shipping_info, and add_payment_info events are sent in the GA4 ecommerce format.
Actual results:
- Add to Cart pushes an addToCart event in the Universal Analytics format, with the product under ecommerce.add.products.
- No view_cart, begin_checkout, add_shipping_info, or add_payment_info event is sent.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide