Scope:
Google Analytics 4 Ecommerce Pro
Google Analytics 4 Ecommerce Pro

Update is available and recommended. Current version is: 1.14.13. Download the latest version of the module from the following link.

Important Note
Important Note

If you're upgrading to version 1.12.1 or newer from a previous version, in order to keep collecting data, regenerate and reimport the JSON file into your Google Tag Manager container, ensuring you choose the Merge + Overwrite Conflicting Tags, Triggers and Variables option when prompted. Detailed steps for the process can be found in the following article: Reimporting a Google Tag Manager Container. This is required because various dataLayer properties have been restructured.

If you're using a fresh installation, follow the normal configuration instructions in the User Guide.

General Configuration
General Configuration

This is a troubleshooting option. If you're experiencing inconsistent data flow in Google Analytics or Google Ads for tags that are set to fire on a Page View trigger, you can set this option to Yes as a potential solution.

Script Attribute Action

This setting can be used to add custom attributes to the extension's script tags. The primary use for this setting is to ensure the extension's script tags stay in the section of the store in cases in which you have 3rd party JS optimization functionalities that push scripts into the page footer. Each attribute needs to be a separate entry, and you can use data-attributes as well. Examples of usage: nodefer, data-javascript-move="false".

Set this option to Yes to enable a button which can be used to trigger a preview window on the frontend which shows the current values of the dataLayer and is updated as the dataLayer is updated

Add IP ranges in this field (comma separated) to limit the display of the dataLayer preview to certain IP addresses only. Leave blank for no restrictions.

The impressions will be sent in separate chunks limited to this number.

Only attributes with Used in Product Listing set to Yes are available here.

Tax will be deduced from Grand Total

Shipping charges will deduced from Grand Total

Orders with value 0.00 can be excluded from purchase transactions if you set this option to Yes

If you are using custom checkout, and the checkout page path is different from the default magento path: 'checkout/index/index', you can list it here to make sure the Transaction data is sent to GTM.
If you have different checkout pages you can separate them with ",".
Ex: checkout/onestepcheckout/index, checkout/mycustomcheckout/index
Also * can be used as generic placeholder.
Ex: checkout/customcheckout/*

If you are using custom checkout, and the success page path is different from the default magento path: 'checkout/onepage/success', you can list it here to make sure the Transaction data is sent to GTM.
If you have different success pages you can separate them with ",".
Ex: checkout/onestepcheckout/success, checkout/mycustomcheckout/success
Also * can be used as generic placeholder.
Ex: checkout/customcheckout/*

This option allows ‘Product Click’ tracking on Category Page , Search results page and Related/Cross-sell/Up-sell product grids.
If Product Click Tracking is enabled this option rewrites Magento_Catalog::product/list.phtml and Magento_Catalog::product/list/list.phtml.
If you are using a custom theme/extension already re-writing this templates check here how you can make the necessary compatibility adjustments:
How to solve GTM compatibility issues

Example of usage: <a href="#" data-track-promo-id="PROMOID" data-track-promo-name="PROMONAME" data-track-promo-creative="PROMOCREATIVE" data-track-promo-position="PROMOPOSITION" >Content</a>

The specified value represents minutes.

Choose between sending the ID/SKU of the Child product or the Parent Product to Google Analytics.

Send all Simple Configurations for Configurable Products for View Item Event

Send the cookies as secure ones. Should only be used if your whole site is on HTTPS.

Setting for compatibility with 3rd party Search Engines - may decrease performance

Set this option to Yes only if you're having issues on Category/Search Pages, such as ignored product limit per page settings or incorrect sorting after enabling the extension. This is usually only required if you're using a 3rd party Search Engine or have modifications/customizations applied to the default product listing on Category/Search Pages.

User Scoped Custom Dimensions

For more details about how to use Custom Dimensions, check out this Support Center article: Google Analytics 4 - Using Custom Dimensions

Hit Scoped Custom Dimensions
Product Scoped Custom Dimensions

Stock Status

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Reviews Count

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Reviews Score

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Sale Product

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Magento's Sale Product Attribute value is used here

Custom Attribute as Custom Dimension

Custom Attribute 1

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Only attributes with Used in Product Listing set to Yes are available here.

Custom Attribute 2

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Only attributes with Used in Product Listing set to Yes are available here.

Custom Attribute 3

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Only attributes with Used in Product Listing set to Yes are available here.

Custom Attribute 4

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Only attributes with Used in Product Listing set to Yes are available here.

Custom Attribute 5

(Retrigger the Variables, Triggers and Tags Setup if you make changes here)

Only attributes with Used in Product Listing set to Yes are available here.

Setting for compatibility with 3rd party Search Engines - may decrease performance
GTM API Configuration
GTM API Configuration
Retrigger the Variables, Triggers and Tags Setup if you make changes here.

Ex: 600354931. Check usage here

Ex: 2293419. Check usage here

Ex: G-123456789

Google Ads Conversion Tracking
Google Ads Conversion Tracking
Retrigger the Variables, Triggers and Tags Setup if you make changes here.

Enable / Disable Google Ads Conversion Tracking - When enabled, a Google Ads Conversion Tracking Tag is generated via the container JSON. If you're enabling this feature after the initial configuration, you'll need to regenerate and reimport the container JSON into Google Tag Manager.

Set this option to Yes to enable a new dataLayer event for Google Ads Conversions, which will be used as a trigger for the Google Ads Conversion Tracking Tag. This is only required if you find your tag isn't picking up the correct transaction details from the dataLayer. If you change this setting, remember to regenerate and reimport the JSON container into Google Tag Manager.

The Google Ads Conversion ID. This ID is found in your Google Ads account. More details on how to find it in the Google Documentation

The Google Ads Conversion Label. This Label is found in your Google Ads account. More details on how to find it in the Google Documentation

The currency code you want to use for your Google Ads Conversions. Ex: USD

Orders with value 0.00 can be excluded from Conversion Tracking if you set this option to Yes

If set to Yes, the dataLayer will be populated with the Email and Phone Number used in the checkout process, which are sent to Google Ads via the Google Ads Conversion Tracking tag. If you're enabling this feature after the initial configuration, please make sure you regenerate and reimport your Google Tag Manager JSON container file. More details about Enhanced Conversions can be found in the Google Documentation.

If set to Yes, the Google Analytics 4 Purchase Tag will be supplemented with Enhanced Conversions data, which is then sent over to Google Analytics. More details can be found in Google Documentation.

If set to Yes, the dataLayer will be populated with the New Customer Data in the checkout process, which is sent to Google Ads via the Google Ads Conversion Tracking tag. If you're enabling this feature after the initial configuration, please make sure you regenerate and reimport your Google Tag Manager JSON container file. More details about New Customer Data can be found in the Google Documentation.

This setting refers to the time (in days) that needs to pass without the customer having completed an order before they're marked as a New Customer again.

Set this option to Yes to enable the Cart Data functionality for Google Ads to enhance ad performance with details regarding the products being sold. To find out more about this functionality, check out the Google Documentation.

Choose between sending the ID/SKU of the Child product or the Parent Product to Google Ads.

The Merchant Center ID where your items are uploaded.

Feed Country - The country associated with the feed where your items are uploaded. Use CLDR territory codes.

The language associated with the feed where your items are uploaded. Use ISO 639-1 language codes.

Google Ads Remarketing
Google Ads Remarketing
Retrigger the Variables, Triggers and Tags Setup if you make changes here.

The Google Ads Conversion ID. This ID is found in your Google Ads account. More details on how to find it in the Google Documentation

The Google Ads Conversion Label. This Label is found in your Google Ads account. More details on how to find it in the Google Documentation

Orders with value 0.00 can be excluded from Google Ads Remarketing if you set this option to Yes

Json Export Options
Json Export Options

Ex: GTM-12XYZ21


Download Json
Measurement Protocol Tracking Configuration
Measurement Protocol Tracking Configuration

Ex: G-XCXCCXXC
Find this information in Google Analytics 4 -> Admin Settings -> Data Stream -> Open the desired Data Stream -> MEASUREMENT ID

Find this information in Google Analytics 4 -> Admin Settings -> Data Stream -> Open the desired Data Stream -> Measurement Protocol API secrets -> create a new API secret key and paste the value into this field

If you are using Client Side Tracking in conjunction with Measurement Protocol, make sure that you only track events on one side or another.
For example, by having the “purchase” tag enabled on client side as well as via measurement protocol, 1 transaction will be triggered twice and it will result in duplicate transactions.

Including the User ID allows for more granular and accurate connection of user counts and behavior across different sessions as well as various devices and platforms.
To find out more about the differences between User ID and Client ID, check out this article.

Enable to send a User-Provided Data object for Purchase events via the Measurement Protocol. More details about User-Provided Data for Measurement Protocol can be found in Google's Documentation.

If set to Yes, a User Properties object will be sent to Google Analytics for each enabled Measurement Protocol event, containing data that can be used to create Custom Dimensions.

To avoid any chance of duplicate events to be sent, you must choose which event is sent via Measurement Protocol or via Data Layer. By enabling this option we automatically disable Data Layer for enabled Measurement protocol events, therefore even existing GTM tags will not fire because the data layer is not sent.

Enable the creation of a log file that shows the pushed event data. The ga4.log file can be found in the var/log directory of Magento 2 root.

Send debug_mode flag to Measurement Protocol Events and enable push of data to https://www.google-analytics.com/debug/mp/collect and logging in the ga4-debug-collect.log file. More information about Debug Collect can be found in the Google Documentation on the subject.

Server-side Google Analytics Tracking (Beta)
Server-side Google Analytics Tracking (Beta)
The true server-side integration for this extension is still currently in its beta phase. The functionality, in its current iteration, allows you to export a fully-configured JSON Container file built specifically for a Google Tag Manager Server container based on your existing client-side Google Tag Manager container.

Please make sure you've already completed the client-side setup, have a functional Google Tag Manager client-side container sending data to Google Analytics and a configured Google Tag Manager server-side container. You can follow Google's Documentation to set up a Server Container into which you can import the file you generate below, to create the necessary tags, triggers and variables for server-side tracking. You will also need to edit your client-side container GA4 tag to send data to your server-side container.

This feature is for advanced users. It will be extended and altered in future versions of the Google Analytics 4 PRO module, so the process is subject to change.

Ex: 600354931. Check usage here
Note: Make sure these values are taken from the Google Tag Manager Server container.

Ex: 2293419. Check usage here
Note: Make sure these values are taken from the Google Tag Manager Server container.

Ex: GTM-12XYZ21.
Note: Make sure these values are taken from the Google Tag Manager Server container.


Download Server Side Json