Lifetime updates | 180 days of free support included ...more |
Google Analytics 4 extension for Magento 2 (Magento GA4) based on Google Tag Manager.
This extension for Magento 2 installs and enables the new Google Analytics 4 Enhanced Ecommerce tracking. It will collect all GA4 events including add_to_cart, view_item, view_item_list, purchase, add_payment_info, add_shipping_info, view_promotion, select_promotion and more.
Packed with ton of features, it's all-in-one tool for collecting analytics tracking data including Google Ads Conversion Tracking with support for Enhanced Conversions and Cart Data, Google Ads Dynamic Remarketing, Google Ads Automated Discounts, Meta Pixel tracking, TikTok Pixel tracking, built-in GDRP feature fully compatible with Google Consent Mode including Consent Mode V2, Google Reviews, Optimize and more. Full server-side tracking support based on Google Analytics 4 Measurement protocol.
Hyvä theme support (optional)
Installation & Updates via COMPOSER (optional)
Magento 2 Google Analytics 4 Enhanced Ecommerce Tracking extension allows you to track all GA4 supported events using Google Tag Manager. It tracks events such as page_view, view_item_list, view_item, select_item, add_to_cart, remove_from_cart, purchase, begin_checkout, add_payment_info, add_shipping_info and much more.
Robust solution compatible with Hyvä theme.
It is the ALL-IN-ONE tool for Enhanced Ecommerce tracking.
It can be used to not only install Google Tag Manager in your Magento 2 store but also enable the awesome world of Enhanced Ecommerce by Google, Google Ads Dynamic Remarketing, Google Ads Conversions, Meta Conversion API etc.
The extension comes also with built-in GDRP Cookie Consent feature compatible with Google Consent Mode and Google Consent Mode V2
It provides both client-based and server-side based tracking via Google Analytics 4 Measurement Protocol
You can receive in-depth data about your customers, their shopping behavior, your product performance, Google Ads performance and more. Data collected includes information about product views, product clicks, cart additions, checkout behaviour progress, transactions and more.
Besides standard Enhanced Ecommerce tracking, the module allows for tracking custom actions such as promotion views, clicks and overall peformance, add to wishlist event, add to compare event, login events, newsletter signup events and more.
Full support for Google Ads Conversion Tracking and the only extension with full support for Google Ads API which allow you to send enhanced conversion adjstments via server-side call.
We have built this extension to be robust and comprehensive. It comes with built-in GDRP cookie consent feature, Google Tag Manager API support which automates the creation of tags, triggers and variables required for tracking, Facebook Pixel including Meta (Facebook) Conversion API support, Google Optimize, Google Customer Reviews, full support for Google Ads Conversion tracking and Google Ads Dynamic Remarketing, backend order tracking, built-in self-assessment features and more...
Extension files in ZIP format
Composer Installation and Updates (optional)
6 months (180 days) of free support
Lifetime free updates
We went beyond standard practices and designed the module to work in combination with our AI extension for Magento 2. With the power of OpenAI (ChatGPT) + Assistant API implementatiom by Anowave, you can now get an AI-Driven analysis for user behavior in browser by combining the module with our AI extension for Magento 2.
Magento 2 Google Analytics 4 is an extension for Magento 2 that delivers full support for Google Analytics 4 and covers EVERY aspect of the Enhanced Ecommerce tracking. It creates the dataLayer[] object so it can meet the new Google Analytics 4 specifications. The module implements all Google Analytics 4 (GA4) ecommerce features using Google Tag Manager. Being based on our GTM module, it provides a full range of additional features such as Google Ads Dynamic Remarketing, Google Ads Conversion Tracking, Google Automated Discounts, Social Network interaction tracking, Facebook Custom Audiences Pixel, Custom Dimensions, Google Customer Reviews, User ID data acquisition and User Timings Tracking.
By enabling enhanced ecommerce you will be able to receive extended set of data with regards to your products, conversion, customers, promotions etc. You can see how your products and categories perform, how product position affects conversion rates and more. Find below some of the events tracked by the extension and the dataLayer[] payload information included.
Enhanced Ecommerce tracking is a combination between tracking product performance and customer actions. This extension handles enhanced ecommerce in it's entirety. It handles the following tracking automatically:
The module includes a built-in Google Tag Manager API implementation allowing for automatic GTM configuration with the click of a button. You can configure everything quickly and without any user errors. The API automatically creates all tags, triggers and variables in your Google Tag Manager account. Created tags get all required settings for Enhanced Ecommerce data. They are also automatically configured in terms of custom dimensions, special options etc. The API supports also the Google Analytics Settings common variables used for configuration grouping.
Conversion tracking can help you see how effectively your ad clicks lead to valuable customer activity, such as website purchases, phone calls, app downloads, newsletter sign-ups and more.
The only extension to provide full support for the new Google Ads API with the following benefits:
Flexibility in providing first-party data post-conversion: Unlike other enhanced conversion methods, such as tagging, which require first-party data to be sent at the time of the conversion, the API allows you to send hashed first-party data up to 24 hours after the event. This also provides the opportunity to source data from systems like customer databases or CRM platforms.
Expanded data source options: The API offers greater flexibility by allowing you to retrieve first-party data from a wide range of sources, including customer databases and CRM systems
Remarketing allows you to show ads to people who have previously visited your website or used your mobile app. Dynamic remarketing takes this a step further, letting you show previous visitors ads that contain products and services they viewed on your site. With messages tailored to your audience, dynamic remarketing helps you build leads and sales by bringing previous visitors back to your site to complete what they started. The module will automatically initialize all required dataLayer[] variables for implementing proper Google Ads Dynamic Remarketing. The API will also configure your GTM accont with regards to remarketing automatically.
Dynamic remarketing offers greater flexibility by providing more information and can use both static and dynamic ads - for example if you know the value of a visitor's abandoned basket you could decide to show a static ad only to visitors whose abandoned basket was over $50 in value and ignore those visitors where the value was less than $50. These rules can be configured within Google Ads and are made possible by providing additional information in the google_tag_params.
The modules comes with a built-in Google Customer Reviews integration. Google Customer Reviews is a free service that allows online retailers to collect feedback from those who have made a purchase on their site. Essentially, it’s a way to earn Google product reviews. The built-in Google Customer Reviews integration will automatically add the suvery snippet and initialize dynamic values such as merchant_id, order_id, delivery_country and estimated_delivery_date automatically. It will also build the gtin products array based on purchased products. It provides an easy and intuitive configuration interface and does not require any development skills.
The Facebook pixel is an analytics tool that allows you to measure the effectiveness of your advertising by understanding the actions people take on your website. You can use pixel data to:
a) Make sure your ads are being shown to the right people
b) Build advertising audiences
c) Unlock additional Facebook advertising tools
Setting up the Facebook pixel usually requires placing pixel code on the header of your website. This extension simplifies the process and allows you to insert the snippet in user-friendly input directly in your Magento admin panel. From then on snippet is placed automatically in the right place in your page. The module also handles Pixel events such as ViewContent, Search, AddToCart, AddToWishlist, InitiateCheckout, Purchase, CompleteRegistration etc.
EUROPA websites must follow the Commission's guidelines on privacy and data protection and inform users that cookies are not being used to gather information unnecessarily.
The ePrivacy directive – more specifically Article 5(3) – requires prior informed consent for storage or for access to information stored on a user's terminal equipment. In other words, you must ask users if they agree to most cookies and similar technologies (e.g. web beacons, Flash cookies, etc.) before the site starts to use them.
For consent to be valid, it must be informed, specific, freely given and must constitute a real indication of the individual's wishes.
To operate properly Google Anlaytics stores cookies on client's browser and these cookies fall into EU cookie compliance directive. Google Analytics is covered by the requirements of the EU Cookie Law. This means the website owners must seek consent for the use of GA. It's not only important to seek customer's consent but not store ANY cookies prior to obtaining it. Many such scripts just ask the customer but the cookie is already stored and although they do show the message, cookie directive law is in effect already broken.
This module provides a mechanism for store owners to get customer's consent and do any tracking from then on. Once consent is granted, the module pushes an event in the dataLayer[] which can then be used as trigger for other consent dependent tags. This allows for flexible control on what tags fire and where. Cookie Compliance is optional and can be turned on/off on demand from Magento backend. This allows non-EU store owners to disable it.
The module includes a SUPER flexible consent mode feature which you can use to obtain permission from users to use tracking cookies. The consent feature included is Consent Mode V2 compatible, it comes with multiple customizable options and more.
User Timings allows you to measure periods of time taken for the customer to do particular action. We have implemented this powerful feature of Google Analytics to work in favour of Enhanced Ecommerce Tracking. The extension will allow you to measure time taken for clicking a product, time taken for adding product to cart, time taken for completing a checkout step and more. Time reports include product name (where applicable), time taken in terms of milliseconds, product category (where applicable), checkout step name (where applicable).
The module has built-in "presentation decoupling" support. This allows multi-language environments to be tracked using single UA-ID property. Instead of sending the current variant values, the extension will pick admin labels and push them in dataLayer[] object. This prevents data discrepancies within reports. To allow for data separation, the extension will push the current store name in dataLayer[] allowing for using custom dimension with each request. While in Europe different language means different country, in countries such as Canada for example, where people speak different languages withing the same country, presentation decoupling is very useful. It allows you to track the total sales and performance of your store and particular product(s).
Like any other feature of the module, presentation decoupling can be turned on and off on demand from the backend panel should you not need it.
Apart from all Enhanced Ecommerce events, the module tracks an extended set of custom events e.g. changeProductImage, checkEmailAvailability, backToShippingMethod, cancelCouponCode, applyCouponCode. These help marketeers better understand customer actions and visit experience
Let's be honest, words mean nothing, but figures do. Find below a snapshot from the performance tests that we run with every extension that we offer in our store. Enhanced Ecommerce is no exception. We've measured page load time (in seconds) in Magento with this extension turned on/off completely. Below is the resulting comparison chart. The total impact on page load time is 183 milliseconds. Now you know.
Technical parameters used in the test: Apache on Windows 10 Pro 64 bit, 16GB RAM, Intel Core I7 4600 U 2.7 GHz, SSD. Test conditions: All Magento cache turned OFF. Magento 2 mode: developer
The GA4 library refuses to send a hit if the full payload size is larger than 8192 bytes. This does require quite a lot of data to be stuffed within, but it only takes some dozens of product impressions to clog up the channel. For sites listing multiple products in categories e.g. not using pagination at all and/or listing all products at once, sending a standard view_item_list event will not work. Even worse, store owner wouldn't even know about this and will certainly end up with inaccruate reports. We have implemented a feature to mitigate this problem. The module will track payloads in excess of 8KB and keep reports consistent and accurate.
Persistent dataLayer[] support is a brand new feature aiming to provide a cross-reference between transactions and specific customer actions. It allows for linking transactions with previously clicked promotions to actually show how a promotion performs with regards to conversions. You can not only see how many times a promotion has been clicked/viewed but also did it lead to transaction and generate a report on how your promotions perform and convert into real results. A persistent data is available in dataLayer[] object ALWAYS and can be used as cross-reference for other events as well.
The module comes with a built-in self-assessment feature. It allows for mapping placed orders with orders that were actually sent to Google Analaytics. From then on it gives the ability to check which placed orders were tracked in GA and which weren't (due to mutliple reasons e.g. hosted gateways, active ad-blockers etc.).
Last but not least, the module is designed and developed in a developer friendly manner. It favours plugins, uses minimum set of rewrites (preferences), it also dispatches multiple custom events (see User guide below) that developers can hook to from their own modules. This keeps the module updateable and still very robust.
Take a quick look at all the options included in the extension.
https://www.youtube.com/watch?v=0JofWpda1G4
The module comes with a premium support, you will get access to our helpdesk where support engineers are available to assist in every possible aspect of installation, configuration, usage and more. Updates are lifetime, free support is 180 days (full 6 months) and this can be later extended as well.
All our products come with a 6 full months (180 days) of premium support. To report a bug, use our Premium Help Desk available in your account at Anowave.
We had a few issues with the API configuration mainly due to some wierd quota limitation by Google themselves but other than that with this extension we were able to switch to GA4 with ease. I'd like to thank the support team for all they did for us and helping us with the configuration. Spot on!
Yes, I recommend this product
Works as described. It kept all the settings we had previously configured in the UA module which is awesome. Had to update the main module to latest version but that's understandable. Good work!
Yes, I recommend this product
We have used Anowave's GTM solution for years and this was a natural choice. It's well designed, well maintained and the support is perfect. The GA4 module blends with the GTM one almost unnoticeably, we manage our stuff from where we used to. There were a few issues but they were mainly configuration oriented and the team helped quickly. Strongly recommend Anowave.
Yes, I recommend this product
This is the only solution that worked for us with this crazy new GA4. The only disappointing bit was that we had to purchase their GTM module as well in order to run GA4 but the price tag was still fine for what we got.
What I like most is that dataLayer[] object is initialized for both GTM UA and GTM GA4 which is what we were looking for.
Support is premium, very polite and responsive. Keep up the good work!
Yes, I recommend this product
This extension just works! It took a few minutes to setup including installation and container configuration which is really impressive! Support is outstanding as well. Thank you guys and thank you Angel for the brilliant attitude.
Yes, I recommend this product
Although we had to install 2 separate modules to get GA4 running, it worked out of the box. No conflicts with anything on our site, tracking is comprehensive and when they say they had it all, they really meant it. We are discovering new features of this extension every day. Value for money 100%!
Yes, I recommend this product
Fair priced module, helpdesk is responsive and very polite. They helped us with ton of adjustments way beyond the default features included. Thank you team Anowave!
Yes, I recommend this product
This extension is perfect for our needs, it took a little while to get used with configuration, best practices etc. but the support team was always there and helped us with everything. Thank you so much for the support Anowave, outstanding service!!!
Yes, I recommend this product
Amazing extension for GA4, has everything that we required including a built-in consent popup which appeared highly customizable and not branded at all. Support is great, very polite, very responsive and we had everything adjusted within a business day.
Can't recommend it enough!
Thank you Angel and the whole team!
Yes, I recommend this product
The extension is awesome! It not only added GA4 but also came with built-in Google Consent Mode V2 support which does not seem to be supported by anyone else. Easy to install via Composer, easy to configure, we had virtually no issue whatsoever. Support seems very experienced and with exceptional knowledge about GA4 specifications and pitfalls.
Thank you for this great extension and keep up the good work boys!
Yes, I recommend this product
Composer Installation and configuration combined took us about 5 minutes. Nice module with lots of options. We've been using other products from Anowave and they are all developed to the finest detail, the GA4 module is no exception.
Can't recommend this enough. Thank you!
Yes, I recommend this product
We tried multiple modules for GA4 but this one appears the best fit for us, it has all the required options and the team behind it is superb, very positive, very open to changes and updates and absolute joy to work with.
Really happy that we found this team and their modules! Definitely recommend it!
Yes, I recommend this product
I have used a GTM module from Anowave for years and this one was a natural choice. Works as expected and it's the same easy to work with and configure.
Recommend it!
Yes, I recommend this product
I'm writing this review to thank Angel for all the support and help he provided. An awesome person to work with and definitely a key member of Anowave's support team!
On a side note, module is huge, lots of options, lots of ways to configure it so I'd recommend contacting support before going live. They will help with everything.
Thank you so much!
Yes, I recommend this product
This extension has solved many issues for us already...and I have not even fully utilised all of its features yet.
The installation was really straightforward using composer but what really overwhelmed me was the amazing and speedy responses from the support team. It transpired that we had an issue in one of our page templates; the support team diagnosed it very quickly and provided a work around...but then they provided a fix for our template - this was nothing to do with their extension but it really helped me out.
I strongly recommend this extension.
Yes, I recommend this product
I am using this extension for 2 full months now and still discovering new options and configurations, this is just amazing! Almost, every new request we had was already supported and just a matter of configuration change. Can't recommend it enough! Brilliant extension!
Yes, I recommend this product
As an eCommerce owner, finding reliable tools and extensions to optimize my store is essential, and Anowave has exceeded my expectations! From installation to ongoing support, they’ve made the entire experience seamless. The 2 extensions that we already use were easy to integrate and have added crucial functionality where others failed.
One thing that stood out was their customer service. They’re responsive, knowledgeable, and always go the extra mile to ensure that everything runs smoothly. Whether it was a simple question or a customization request, the team handled it with speed and expertise. I’ve seen a noticeable boost in engagement and conversions since implementing these tools.
I highly recommend this company! Quality products backed by a fantastic team – I couldn't be happier.
Yes, I recommend this product
We tried similar extensions up to three times more expensive and they turned to have up to 3 times less options than this one, probably one of the best extensions for GA4 tracking currently on the market! The company and support are solid, always respond within an hour or so and have always delivered without exception. Anowave is definitely our first choice from now on, really happy to have found you guys!
Thank you so much!
Yes, I recommend this product
Fair priced extension. It took a day to install and fully configure, eventually it worked as described. Updates seem to be free, free support seems limited to 6 months which is way higher than what we've used to with other extensions developers. So far so good!
Yes, I recommend this product
There was no demo but the module turned out to be exactly what I was looking for. Amazing extension, full of options, super flexible. Support team is very professional. Very happy with Anowave so far.
Yes, I recommend this product
I am truly impressed with this extension. My initial expectation was that it will take a lot of time to install and configure but it was quite the opposite. Installing via Composer was a breeze, GTM configuration was done automatically with the click of a single button, everything perfectly created in GTM.
It took a a day or so for data to appear in our GA4 reports but we are getting all of it.
Can't recommend this extension enough. Superb!
Yes, I recommend this product
Extension itself works as expected, I'm writing this review to specifically thank Angel for the professional support they provided us with. Great team member, helped us with a customization that we were not able to do ourselves and got involved for hours without us paying anything extra.
In these days you have to pay to everyone for everything and it's really nice when you meet such professionals with total respect for their clients.
Thank you, keep up the good work!
Yes, I recommend this product
This extension can be installed in a few minutes, by going through the following steps:
You can install this extension via Composer only after purchasing a Composer support package
Enhanced Ecommerce tracking is done by sending enhanced measurement events via the so called Google Analytics 4 Event tag. We have outlined some of the essential events supported by the module which are sufficient for proper Enhanced Ecommerce tracking.
view_promotion |
select_promotion Measures click on a promotion
|
view_item_list Measures product/item list views/impressions
|
refund Measures refunds
|
select_item Measures product click (from categories)
|
view_item Measures product detail views
|
add_to_cart Measures click on "Add to Cart" button
|
add_to_wishlist Measures click on "Add to Wishlist" button
|
remove_from_cart Measures click on "Remove from cart" button
|
view_cart Measures cart view
|
begin_checkout Measures checkout start
|
add_shipping_info Measures selected shipping method
|
add_payment_info Measures selected payment method
|
purchase Measures transactions on success page
|
The Google Analytics: GA4 Configuration tag initializes Google Analytics for your Google Analytics 4 property on a particular page. It handles behavior such as setting of Google Analytics cookies, sending automatic and enhanced measurement events, and declaration of common settings. In effect this is the tag that does 90% of the work and installs Google Analytics 4 on the site.
The built-in API will create this tag for you automatically
Watch a quick video on YouTube - https://www.youtube.com/watch?v=U8dK95FRP1w
Anowave_Ec4 module works on top of our Anowave_Ec module, it's designed to modify the dataLayer[] object as per GA4 specification (https://developers.google.com/tag-manager/ecommerce-ga4)
When installed:
1. A new field called Measurement ID appears in Google Tag Manager API configiration section. This is obtained from Google Analytics 4 and it's in the following format: G-XXXXXXXXXX
2. A 3 new checkboxes appear that allow you to:
a) Create GA4 variables
b) Create GA4 triggers
c) Create GA4 tags (creates also the Google Analytics 4 configuration tag)
3. Google Analytics 4 Configuration tag
The Google Analytics: GA4 Configuration tag initializes Google Analytics for your Google Analytics 4 property on a particular page. It handles behavior such as setting of Google Analytics cookies, sending automatic and enhanced measurement events, and declaration of common settings. This is in effect what tracks Pageviews and installs Google Anlaytics 4 on your site
4. dataLayer[] modifications
dataLayer[] object gets modified as per GA4 specification (https://developers.google.com/tag-manager/ecommerce-ga4)
5. To our understanding, it's better to create a new empty container and use the API to configure it for GA4 by clicking only the GA4 checkboxes from our API, this will create the GA4 variables,triggers and tags including the Google Analytics 4 Configuration tag. Having the container inflated with the old tags is not a mistake but they won't fire or if some of them fires it could duplicate and/or corrupt data.
6. There are certain limitations of GA4 (due to being in beta mode probably) to be aware of:
a) Checkout can no longer be tracked in terms of checkout steps. There are a few events dispatched:
begin_checkout
add_payment_info
add_shipping_info
b) Product list attribution no longer works, it's simply not available yet in GA4
c) There are no more product-scoped dimensions.
Configuration steps
Configuration is really simple but it will require some pre-config steps. In order to track stuff properly, you have to have a GTM container configured with the required tags/triggers and variables. You can do this configuration really easy using the built-in API. It requires no technical expertise whatsoever.
We have outlines a few configuration steps below required for module to work properly:
1. Install the module
2. Enter a license key in Stores -> Configuration -> Anowave Extensions -> Google Tag Manager GA4 and set Enable to "Yes"
3. Go to Stores -> Configuration -> Anowave Extensions -> Google Tag Manager and expand the Google Tag Manager API section
4. Enter your Account ID and click Sign in
5. Once singed in, pick the Container ID which you want to configure. It is recommended to configure an empty/new container to avoid messing with UA tags
6. Enter your Measurement ID
7. Click ONLY GA4 related checkboxes e.g. Create variables (GA4)/Create triggers (GA4)/Create tags (GA4). Make sure not to click the first 3 checkboxes because they will create also standard UA tags in your container
8. Click "Save config" (note that saving could take a while so be patient)
To configure Google Ads, check the steps/guide outlined below.
General Setup
1. Google Ads Conversion Tracking
In our extension configuration screen go to Google Ads Conversion Tracking tab and insert your conversion id and conversion label (obtained from Google Ads). The word "purchase" is default and should be replaced with your own label. Once these are inserted, flush cache and conversion tracking should work out of the box. You don't need to define anything in terms of GTM tag/configuration. Google Conversion Tracking is built-in in our module for customer ease.
2. Google Ads Dynamic Remarketing
If you used our API to create all triggers, then you should have a tag called EE AdWords Dynamic Remarketing and 2 variables in GTM -> Variables e.g. "ee conversion id" and "ee conversion label"
a) Go to GTM -> Variables and edit "ee conversion id" variable. Insert your conversion id (obtained from Google Ads)
b) Go to GTM -> Variables and edit "ee conversion label" variable. Insert your conversion label (obtained from Google Ads)
c) Publish new container version
This will activate Google Ads Dynamic Remarketing.
ENHANCED CONVERSIONS support
Our latest versions support Enhanced Conversions Enhanced conversions is a feature that can improve the accuracy of your conversion measurement. It supplements your existing conversion tags by sending hashed first-party conversion data from your website to Google in a privacy-safe way.
Before you begin, watch a short video on YOUTUBE - https://support.google.com/google-ads/answer/9888145
Enhanced Conversion tracking is supported in multiple ways via our module.
gtag.js based
1) If you switch to gtag.js based conversion tracking (selected from Implementation dropdown in config screen), Enhanced Conversion tracking will be enabled by default
To switch to gtag.js based conversion tracking:
a) Go to Stores -> Configuration -> Anowave Extensions -> Google Tag Manager -> Beta panel and set Beta to Yes
b) Go to Stores -> Configuration -> Anowave Extensions -> Google Tag Manager -> Google Ads and set "Implementation" to "Using gtag.js"
c) Insert your gtag.js global site tag snippet INCLUDING opening and closing SCRIPT tags. If you are to enable Enhanced Conversions you must also modify the gtag snippet to include the following configuration:
d) Insert "Send to" parameter (it is available in your account at Google Ads -> Tools & Settings -> Conversions -> (Select conversion) -> Tag Setup -> Install the tag yourself -> Event snippet
Custom implementation
2) If you'd like to do your own implementation, our module defines a global JS variable - enhanced_conversion_data
The global JS variable enhanced_conversion_data is a JSON object with the following properties.
Google Ads End Configuration
Google PART
Enabling Enhanced Conversions for Conversion Actions
1. Go to Goals -> Conversions -> Settings
2. Expand Enhanced Conversions
3. Click Turn On Enhanced Conversions
4. Under 'Choose a method for setting up and managing user-provided data' select 'Google Tag'
5. Click Tag details
6. Check Specify CSS selectors or JavaScript variables
7. Activate each selector, next to each selector select 'Global Javascript variable', then insert enhanced_conversion_data.email (example is for email)
Other values may include:
enhanced_conversion_data.email
enhanced_conversion_data.phone_number
enhanced_conversion_data.first_name
enhanced_conversion_data.last_name
enhanced_conversion_data.street
enhanced_conversion_data.city
enhanced_conversion_data.region
enhanced_conversion_data.country
enhanced_conversion_data.postal_code
8. Once all fields are filled, click Save.
Common Troubleshooting
1. Error type: Missing user data fields / Not enough matches for your conversion
Fix: Configure the conversion in Google Ads to only use the email and the phone fields, and not the address. Region field could be null for UK purchases and the diagnostics would be flagging that the data being sent was incomplete.
This module can track promotion views and promotion clicks. However, different customers use different promotions e.g. banners, sliders, static images etc. which makes it impossible to track them all. To solve this we have introduced a smart way to enable promotions in your site by doing a few code changes at HTML level. Althought this is DYI, it's very easy to achieve.
To make an object promotion simply add data-promotion="true" attribute. Then add the rest of the attributes from Enhanced Ecommerce specification related to promotions e.g.
Note: Values are fictional. Fill in your own values.
A typical HTML element would look like shown in the figure below.
data-promotion-* attributes can be applied to any element on the page.
Parts of the tracking related to event tracking may involve adjusting a few configuration selectors. Under Advanced Developer Configuration we have exposed a few selectors which provide a flexible mechanism of detecting elements on your page and binding the corresponding tracking e.g. productClick, addTocart etc. These selectors are XPath selectors. XPath uses path expressions to select nodes or node-sets in an XML document. The node is selected by following a path or steps.
In effect these selectors describe the path to specific elements on your page and allow the module to hook to them dynamically. There are several important selectors.
1. Impression list selector - Used to detect a list of products in categories
2. Impression click selector - Used to detect a clickable element e.g. product title, image from categories
3. Add to cart selector from categories - Used to detect direct "Add to cart" button from categories
There are also other less important selectors with self-explanatory names.
One may find this part of the configuration a bit technical so if you're unsure how to configure or if these need to be adjusted at all, please contact our help desk. Support engineers will clarify on this.
For technical person, it should be relatively easy to adjust these as long as you're aware on the following.
a) "//" double slash means an absolute selector, if selector starts with double slash e.g. // it will be applied on the whole content, in some cases could be the whole page or the listings HTML
b) If a selector starts with element, it's then a relative selector and will be applied on the content matched from the previous/dependable selector. Impression click selector for example depends on impression list selector. The first one must be absolute selector while latter one should be relative.
A good example would be:
a) Presume category products are listed in ORDERED LIST e.g. OL/LI, OL has ID - products, in this case the Impression list selector becomes: //ol[contains(@class,"products")]/li which reads "pick ALL LI elements which are direct children of OL element with attribute ID equal to "products"
b) Presume that product link which we need to track productClick exists in OL/LI/DIV/A with class "product-image", the Impression click selector becomes: DIV/A[contains(@class,"product-image")] which reads "pick A element which is child of DIV element which is direct child of previously matched LI element
The latest version of the extension comes with built-in Cookie Consent directive. This allows visitors to choose whether they allow site owner to collect and store cookies. A cookie is a small piece of data that a website asks your browser to store on your computer or mobile device. The cookie allows the website to "remember" your actions or preferences over time.
Most browsers support cookies, but users can set their browsers to decline them and can delete them whenever they like.
To enable this feature go to Stores -> Configuration - Anowave Extensions -> Google Tag Manager -> Cookie Consent Directive and set "Enable Cookie Consent" to "Yes". Configure other settings as per your requirments.
Enabling Cookie Consent however isn't sufficient because some of your tag may still fire. In most cases, the GA4 Configuration tag that fires on all pages will still fire. To prevent this, you need to change the tag trigger from Initialization All pages to custom event e.g. cookieConsentGranted. This event will be fired once visitor accepts cookie usage and on every page from then on.
Important: If cookie consent is disabled the GA4 configuration tag trigger should be reverted back to "Initialization All pages", otherwise it won't fire thus losing essential tracking data such as page views, transactions etc.
Google Consent Mode V2 configuration
If you use Google Consent mode for your tags and/or have Additional Consent Checks you need to edit your GA4 Configuration tag (Google Tag) and change it's trigger from All Pages to Event Equals Cookie Consent Granted. This will allow this tag to fire whenever consent is granted. Otherwise, the tag will fire on all subsequent requests therefore you will lose the initial HIT.
Testing Consent Mode / GDRP features involves the following steps:
1. Hit F12 in your browser, then go to Console -> Storage and remove any cookies prefixed 'cookie' e.g. 'cookieConsentGranted' etc.
2. Go to Console -> Local Storage and remove 'consentMode' value
3. Once done, put GTM in Preview mode and refresh your site.
4. Accept cookies and check if GA4 Configuration (Google Tag) is firing.
5. Optionally (as a developer) you can check Console -> Network requests for any requests to https://region1.google-analytics.com/g/collect?v=
Also when checking browser requests in the F12 -> Console -> Network tab, you can inspect 1 important parameter:
gcs - Encodes the current state of the user’s consent. The gcs parameter always begins with “G1” and is followed by two other digits, either 1 or 0. The G1 is a constant that indicates that the parameter is a GA4 consent mode parameter, so the first 1 doesn’t tell us anything.
G100 No consent has been granted.
G110 Google Ads has consent, Google Analytics does not.
G101 Google Analytics has consent, Google Ads does not.
G111 Both Google Ads and Google Analytics have consent.
3rd PARTY Consent Configuration
The feature provides a mechanism to include third party script into consent mode compliance. To do so, you need to add some data-* attributes tagging to those scripts. The following changes are required:
1. Remove 'async' attribute
2. Change 'type' attribute from 'text/javascript' to 'text/template' e.g. type='text/template'. If type attribute is missing, add it as 'text/template'
3. Add data-consent="true" attribute to the SCRIPT tag
4. Add data-segment="cookieConsentGranted" attribute to SCRIPT tag. Segments include:
Review granted permissions
You can review all granted permissions in a separate menu in admin panel under Admin -> Reports -> GDRP Consent (see below)
Find below a list of the custom events dispatched by our module. These can be used to interact with the dataLayer[] object from your own modules and push/modify data covering your own requirements.
ec_get_widget_click_attributes
Allows 3rd party modules to modify widget click attributes e.g. data-attributes="{[]}"
ec_get_widget_add_list_attributes
Allows 3rd party modules to modify widget add to cart attributes e.g. data-attributes="{[]}"
ec_get_click_attributes
Allows 3rd party modules to modify product click attributes e.g. data-attributes="{[]}"
ec_get_add_list_attributes
Allows 3rd party modules to modify add to cart from categories attributes e.g. data-attributes="{[]}"
ec_get_click_list_attributes
Allows 3rd party modules to modify category click attributes e.g. data-attributes="{[]}"
ec_get_remove_attributes
Allows 3rd party modules to modify remove click attributes e.g. data-attributes="{[]}"
ec_get_add_attributes
Allows 3rd party modules to modify add to cart attributes e.g. data-attributes="{[]}"
ec_get_search_click_attributes
Allows 3rd party modules to modify search list attributes e.g. data-attributes="{[]}"
ec_get_checkout_attributes
Allows 3rd party modules to modify checkout step attributes e.g. data-attributes="{[]}"
ec_get_impression_item_attributes
Allows 3rd party modules to modify single item from impressions
ec_get_impression_data_after
Allows 3rd party modules to modify impressions array []
ec_get_detail_attributes
Allows 3rd party modules to modify detail attributes array []
ec_get_impression_related_attributes
Allows 3rd party modules to modify related attributes
ec_get_impression_upsell_attributes
Allows 3rd party modules to modify upsell attributes
ec_get_detail_data_after
Allows 3rd party modules to modify detail array []
ec_order_products_product_get_after
Allows 3rd party modules to modify single transaction product []
ec_order_products_get_after
Allows 3rd party modules to modify transaction products array
ec_get_purchase_attributes
Allows 3rd party modules to modify purchase attributes
ec_get_search_attributes
Allows 3rd party modules to modify search array attributes
ec_api_measurement_protocol_purchase
Allows 3rd party modules to modify payload for measurement protocol
ec_get_purchase_push_after
Allows 3rd party modules to modify the purchase push
The module is developed in a way that dataLayer[] object gets initialized prior to sending a Pageview. While this brings more natural way of sending data to Google Analytics, it may bring minor performance issues mainly due to the fact that GTM snippet is located in HEAD section and this is where Pageview is fired. To get the dataLayer[] object initialized correctly, the module does some data pre-fetching. Performance impact is minimal on all pages except for category pages where payload could be significant especially in categories with lots of products. To improve performance you can pick from 2 types of dataLayer[] initializations e.g. Before Pageview and After Pageview. The latter one improves performance drastically however it requires additional adjustments in GTM tags and triggers. By delivering those 2 selectable types of initializations the module allows you to pick between more natural dataLayer[] initialization and improved performance.
To set dataLayer[] initialization model go to Stores -> Configuration -> Anowave Extensions -> Google Tag Manager -> Enhanced Ecommerce Tracking Preferences -> Impression Payload Model. In there we have included a User Guide that explains this feature in detail and the changes you need to do depending on the chosen initialization model.
Another bottleneck could be deeply nested category hierarchy and also number of categories. On sites with 2000+ categories, performance could be improved by disabling a setting called Use category segments from our module. When disabled, the module will not send the category as slash separated string but only the very category that product exists.
Our module provides supports for server-side tracking for events such as 'purchase','refund' and reverse transactions. This tracking is optional and needs to be enabled in config.
General comfiguration
Server-side tracking is based on using Google Analytics 4 Measurement protocol. In order to work properly, the API needs to be configured with proper Measurement ID and Measurement API secret. These are inserts under Stores -> Configuration -> Anowave -> Google Tag Manager GA4 -> Google Tag Manager API
Measurement ID - Measurement ID for a GA4 data stream. Format: G-XXXXXXXXXX
Measurement API Secret - To create a new secret, navigate in the Google Analytics UI to: Admin > Data Streams > choose your stream > Measurement Protocol > Create
These are mandatory for server-side tracking
Tracking offline orders
To enabled offline/admin orders tracking go to Stores -> Configuration -> Anowave -> Google Tag Manager GA4 - Measurement Protocol Google Analytics 4 -> Set Track offline orders to 'Yes'. This will enable tracking for orders placed in admin panel
Tracking cancelled orders
To enabled offline/admin orders tracking go to Stores -> Configuration -> Anowave -> Google Tag Manager GA4 -> Measurement Protocol Google Analytics 4 -> Set Track cancelled orders to 'Yes'. This will enable tracking for orders that are cancelled in admin panel. This will in effect send a reverse transaction to Google Analytics 4
Tracking refunded orders
To enabled offline/admin orders tracking go to Stores -> Configuration -> Anowave -> Google Tag Manager GA4 -> Measurement Protocol Google Analytics 4 -> Set Track refunds to 'Yes'. This will enable tracking for orders that are refunded in admin panel. Refund request is send to GA4 when a CREDIT MEMO is created.
Tracking frontend orders using server-side implementation
To enabled offline/admin orders tracking go to Stores -> Configuration -> Anowave -> Google Tag Manager GA4 -> Measurement Protocol Google Analytics 4 -> Set Track server-side ONLY to 'Yes'. This will enable tracking for orders placed on frontend using server-side request.
If installed properly, Google Tag Manager should contain (at minimum) the tags shown in the figure below.
Unlike Universal Analytics, testing Google Analytics 4 could be tricky and time consuming. We have prepared a few steps below to use as a guide on how to test and debug Google Analytics 4.
1. Prepare GTM for debugging
In order to start the debugging process you must prepare GTM for debugging. To do so, edit GA4 Configuration tag and under Fields to set add new Field with Field name: debug_mode and Value: true (as shown below)
Once done, Publish new container version so changes could take effect.
2. Run GTM in Preview mode
To run GTM in Preview mode, go to GTM and click Preview. You will be requested to enter your domain and from then on GTM will open a new debug window.
3. Open Google Anlaytics 4 DebugView
Go to Google Analytics -> Confiure -> Debug view. This will open GA4's debug view screen where you can observe the events fired in real time. If everything is set correctly, you should see your browser in DEBUG DEVICE dropdown.
If all 3 points above are done, you can now start testing. Browse the site as regular user, check what tags fire in GTM Preview console, check what events fire in DebugView in GA4. You can also place a test order and check if both EE4 Purchase tag is fired and the 'purchase' event is shown in DebugView.
Google Analytics 4 despite being new stuff, proved to be hard to work with and has potentially steep learning curve. We're learning new stuff ourselves everyday so let's check the following stuff that could be causing incorrect reports. Function-wise our extension is designed and working as per Google's specifications displayed here - https://developers.google.com/tag-manager/ecommerce-ga4, dataLayer[] object is initialized with all the required parameters and the payload that is being pushed for every event meets the requirements. Still, there are few things that could be causing missing or invalid data in your GA4 property.
1. LATENCY
Google Analytics for has insane data latency, sometimes up to 48 hours or even more. If you've placed a test order today or yesterday, they might not appear yet in your reports.
2. TECHNICAL REQUIREMENTS
From technical perspective, the following things should be checked and verified
2.1 Check what version you have of Anowave_Ec4 module (check app/code/Anowave/Ec4/CHANGELOG.md). If lower than ## [100.4.3] - 17/05/2022, upgrade both Anowave_Ec and Anowave_Ec4 to latest versions.
2.2 Check if you have the following TAGS in your GTM container:
EE AdWords Dynamic Remarketing
EE4 Add Payment Info
EE4 Add Shipping Info
EE4 Add To Cart
EE4 Add To Compare
EE4 Add To Wishlist
EE4 Begin Checkout
EE4 Purchase
EE4 Refund
EE4 Remove From Cart
EE4 Select Item
EE4 Select Promotion
EE4 View Cart
EE4 View Item
EE4 View Item List
EE4 View Promotion
GA4 Configuration
2.3 Edit EE4 Purchase tag and check if ALL of the following Event parameters are set.
items
transaction_id
value
currency
shipping
tax
affiliation
Missing 'currency' parameter will cause revenue to show as $0.00 instead of the actual revenue.
2.4 DUPLICATE events/transactions
There are multiple reasons that could be causing this, I have described most common ones below.
We highly recommend this article - https://www.analyticsmania.com/post/duplicate-events-in-google-analytics-4-and-how-to-fix-them/
It describes most of the potential reasons for duplicate stuff.
3. VERIFYING & TESTING
Confirming that GA4 is tracking data properly is usually done by a combination of running GTM in Preview mode and setting GA4 in DebugView
To use the DebugView report:
3.1 Enable debug mode
To enable debug mode, edit GA4 Configuration tag and under Fields to set, add new field with Field name set to "debug_mode" and Value set to "true". Once done, publish the container
3.2 Observe events as they are tracked
To check events run GTM in Preview mode and then go to your Google Analytics 4 Property -> Configure > DebugView
You should see all events here the moment they fire on your site, you can now place a test order and see if the 'purchase' event is fired and if it has all the parameters required for successful tracking.
Transactions are tracked by the EE4 Purchase tag. Make sure that this tag appears in the list of fired tags on your success page. This will ensure that transaction data is sent to Google Analytics 4 successfully
4. VERIFYING & TESTING (AS A DEVELOPER)
In addition to stuff described in pt. 3 (see above), as a developer you can use the browser console to check if transactions are tracked properly.
4.1 To test it in the browser, hit F12 to display Developer Tools (in Firefox or Chrome)
4.2 Select Network tab which displays all network requests and type a manual filter e.g. "collect?v=" to filter Google Analytics 4 requests only.
4.3 Place a test order and inspect the network requests. There should be at least one POST request with the following headers:
pr1iddownloadable
~nmDownloadable
~br
~qt3
~pr2400
~k0currency
~v0USD
~caProducts
~k1item_category_2
~v1Accessories
ep.debug_mode true
ep.transaction_id 000000060
epn.value 7220
epn.shipping 0
epn.tax 1200
ep.affiliation Default Store View
Anowave is an extension developer for Magento 1.x and Magento 2.x platforms. We provide a wide range of premium extensions for our in-house and public clients. The extensions we offer extend the capabilities of Magento and provide bespoke functionality. They also fill some gaps in the functionality provided by the base platform and help customers choose Magento as their preferred eCommerce platform.
The extensions we offer are part of our full-range Magento service, which also includes a Premium Helpdesk where customers can speak with actual software engineers and have their issues resolved without hassle. Premium-labeled modules also include free installation, configuration, testing, etc.