Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

Extension for Magento by Anowave

  • In Stock
  • Price:
  • €119 90
  • SKU:
  • MAGE2-GTM
  • Premium product
  • Premium product
  • MADE IN



Google Tag Manager for Magento 2 with full support for Google Analytics Enhanced Ecommerce, AdWords Dynamic Remarketing, AdWords Conversion Tracking, Social Network interaction tracking, Facebook Custom Audiences Pixel, Custom Dimensions, Google Customer Reviews, User ID data acquisition and User Timings Tracking.

Track product impressions, product detail views, add and remove from cart events, checkout steps and options, refunds, transactions and promotions performance in Magento with Google Tag Manager.

Check also version for Magento 1

Extended support for GA4 in combination with Magento 2 Google Analytics 4 Enhanced Ecommerce tracking

Built for Magento 2

Magento 2 Google Tag Manager Enhanced Ecommerce (UA) Tracking extension allows you to track product impression, product detail views, add to cart action, remove from cart actions, checkout steps and purchases using Google Tag Manager.

It is the ALL-IN-ONE tool for Enhanced Ecommerce tracking.

Cover EVERY aspect of Google Analytics

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, AdWords Dynamic Remarketing and AdWords Conversion.

In-Depth Analytics

You can receive in-depth data about your customers, their shopping behavior, your product performance, AdWords performance and more. Data collected includes information about product views, product clicks, cart additions, checkout behaviour progress, transactions and more.

Ton of BUILT-IN options

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 Facebook Conversion API support,Google Optimize, Google Customer Reviews, full support for AdWords Conversion tracking and AdWords Dynamic Remarketing, backend order tracking, built-in self-assessment features and more...

Overview

Magento 2 Google Tag Manager Enhanced Ecommerce (UA) Tracking extension allows you to track product impression, product detail views, add to cart action, remove from cart actions, checkout steps and purchases through Google Tag Manager and Data Layer. 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, AdWords Dynamic Remarketing and AdWords Conversion tracking. You can receive in depth data about your customers, their shopping behavior, your product performance, AdWords performance and more.

 

How it works

The extension works by pushing enhanced ecommerce data to the dataLayer[] object automatically. It detects current page and adds relevant enhanced ecommerce data to a special object called dataLayer used by Google Tag Manager. When data is pushed, one or several tags defined in Google Tag Manager fire and send the pushed data to Google Analytics.

Data send to Google Analytics becomes available under Google Analytics -> Conversions -> E-Commerce and it is all you need for a proper shopping analysis, checkout experience, checkout steps drop-off and more. Such data being present allows for conversion rate optimisation and in effect increase in sales and profit. See below some of the key features of the extension.

 

Key features

  • Covers EVERY aspect of enhanced ecommerce tracking for Magento 2.x
  • FULL support for the new Google Analytics 4 (requires addional small add-on) BRAND NEW
  • ALL versions of Magento 2.x supported
  • Works with Google Tag Manager
  • Install Google Tag Manager through the extension itself
  • Supports the new splitted approach of inserting GTM snippet in both head and body
  • Track product clicks
  • Track augmented product clicks
  • Track product impressions in category listing
  • Track an exteded set of impression parameters e.g. category list/grid mode, current sort etc.
  • Track an extended set of custom events
  • Track product detail views
  • Track combined product details views + Related Products + Up-Sells
  • Track configurable product variant detail views
  • Track pre-selected configurable attributes/swatches view (via URL query parameters)
  • Track add to cart actions including quantities, product variants and options
  • Track cart quantity change/update
  • Track remove from cart actions
  • Track checkout steps
  • Track checkout step options (e.g payment method chosen, shipping method etc.) *
  • Track product add to compare events
  • Track product add to wishlist event
  • Track purchases
  • Track purchases made from Magento backend (admin orders)
  • Track refunds / built-in transaction reversal (for canceled orders)
  • Track refunds generated via REST API call BRAND NEW (NOV 2021)
  • Track contact form submissions
  • Track newsletter submissions
  • Track clicks/cart additions from widgets (New products etc.)
  • Track search results
  • Track order coupon code
  • Track product-specific coupon code
  • Track apply coupon and cancel coupon events at checkout
  • Track brands
  • Track stock status
  • Track/correlate internal search with impressions/details views and purchases
  • Track direct add to cart from categories
  • Track direct add to cart of configurable swatch from categories
  • Track unsuccessful "Add to cart" of configurable product from categories / redirects to detail page
  • Google Tag Manager API Support with ability to create all tags, variables and triggers directly from Magento admin interface automatically * NEW
  • Google Analytics Measurement Protocol Support to track offline orders, orders made from backend
  • Ability to send/track existing transactions (not recorded) to Google Analytics manually (via mass actions)
  • Visitor data tracking including Universal Analytics User ID
  • AdWords Dynamic Remarketing support
  • AdWords Dynamic Remarketing support for Dynx_ (Other site) types
  • AdWords Conversion Tracking support (standard implementation)
  • AdWords Conversion Tracking support ( gtag.js implemenation)
  • Support for AdWords Enhanced Conversions BRAND NEW (DEC 2021)
  • Ability to pick custom ecomm_prodid BRAND NEW (OCT 2019)
  • Built-in Google Customer Reviews BRAND NEW (NOV 2019)
  • Built-in affiliation tracking support based on GTM / cost per order (CPO) tracking. Product-scoped affiliate correlation.
  • User Timings Tracking *
  • Custom Definitions and Dimensions Support
  • Extended set of GTM variables allowing easy access to revenue, transaction id, visitor id etc. All suitable for implementing tags such as AWIN, TURN, Google Customer Reviews (former Trusted Stores) purely in Google Tag Manager
  • Extended Support for AMP (Accelerated Mobile Pages) GTM container types
  • Extended Support for Google Optimize (assisted and standalone implementation)
  • Built-in Cookie Law Consent Directive / Cookie Law friendly GTM implementation
  • GDPR (May 25, 2018) friendly
  • Extended GDPR (generic and segmented consent)
  • Facebook Upgraded Custom Audience Pixel Support for Magento
  • Facebook Tag API Support
  • Facebook Pixel Tracking / GDPR compatible
  • Facebook Conversions API BRAND NEW (OCR 2021)
  • Facebook Conversion API/Pixel Event Deduplication BRAND NEW (OCR 2021)
  • Track an extended set of Facebook events (FB) such as CustomizeProduct
  • Presentation decoupling support
  • Private browsers fallback
  • Self-assessment support and correlation between placed orders and successfully tracked orders. BRAND NEW (NOV 2021)
  • DIY (Do it yourself) user friendly JS API + Developer tools (custom events set to allow for adding your own parameters in JSON pushes)
  • Automatic 8KB payload limit mitigation
  • Capture Performance API data into User Timing reports
  • Persistent dataLayer[] data support
  • Adjustable tax settings
  • Supports Magento 2 default Full Page Cache
  • Supports Varnish cache
  • Supports Private data
  • Supports multi-store
  • Supports multi-currency
  • Supports transaction filter-out by payment method. Suitable for financial options
  • Support for PHP up to 8.1.5
  • Works fine with scripts moved to bottom of the page NEW
  • Extended support for 3rd party onepage checkout solutions EXTRA
  • Adjusted tracking for multi-category products / Advanced checkout/category correlation
  • Does not overwrite existing blocks, templates, modules etc.
  • Suitable for custom Magento 2 themes including AJAX based carts.
  • Supports Hyva Theme (via compatibility module) BRAND NEW
  • Developer friendly
  • No monthly fees

* theme dependable features that may require fine tuning by our engineers.

 

In-Depth Ecommerce Analytics

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.

 

 

What's included?

  1. Extension files in ZIP format
  2. 6 months (180 days) of free support

 

Enhanced Ecommerce tracking

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:

  1. ESSENTIAL PERFORMANCE TRACKING
    Tracks product detail views, product impressions including product positions and position performance, transactions, refunds, promotions impressions and detail views and more.
     
  2. SUPPLEMENTAL PERFORMANCE TRACKING
    Except for the enhanced ecommerce tracking, the extension also provides automatic tracking for User ID, AdWords Conversion Tracking, AdWords Dynamic Remarketing, Facebook Conversion Tracking and more.
     
  3. ESSENTIAL EVENT TRACKING
    Tracks user actions such as "Add to cart", "Remove from cart", checkout steps including step options selected during checkout, user timings and more.

 

Google Tag Manager API

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.

 

AdWords Conversion Tracking

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.

 

AdWords Dynamic Remarketing

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 AdWords 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 AdWords and are made possible by providing additional information in the google_tag_params.

 

Google Customer Reviews

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.

 

Facebook Pixel

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.

 

EU Cookie Compliance

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.

 

User Timing Tracking

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).

 

Presentation decoupling

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.

 

Extended set of custom events

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

 

Performance

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

 

8KB Payload mitigation

The analytics.js 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 impression tracking 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[] data support

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.

 

Self-assessment

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.).

 

Developer friendly

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.

 

Premium support

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.

Latest version
## [102.0.1]
Magento platform version
2.0.*,2.1.*,2.* EE,2.2.*,2.3.*,2.4.*
Application/Purpose
Conversion rate,Reporting
Type
Commercial

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.

Customer review(s)

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

We've been using this excellent extension for 1.x and now when we switched to the one for 2.x we see some features not implemented yet. The support team assured us that all features will be added in time so we're really happy with this extension so far.

Keep the good work Anowave!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

I love the new auto-generation of tags in GTM by this plugin. And a big thank you to Angel for incredible, patient, fast, repeated support. Debugging a site via email without FTP access across timezones didn't faze him at all and he kept going until we were happy.

Definitely our preferred Google GTM/GA/remarketing plugin.

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

We're having nothing but pain with Magento 2 and was really happy to find a module that works without any general issues. Although it requires certain level of understanding and we had to ask for support, the extension is working as expected.

Thanks for the great support!.

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

We started building this functionality from scratch and ended up nowhere. Setting enhanced tracking in Magento 2 is absolute nightmare and I'm personally delighted that this module exists.

It required a few tiny adjustments for our theme, but eventually all worked out perfectly.

Good module!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

Good and comprehensive solution, fits our needs, and the first to actually work fine with the native FPC of Magento 2. Anowave have done awesome job.

Do recommend it!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

As the one for 1.x (which is seamless), this one works well and does the job. Certainly helped us a lot in shifting to Magento 2, one less thing to fight with in this new but cumbersome platform.

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

Been purchasing different types of extensions , with different vendors, and let me tell you that this is the MOST comprenhensive and outstanding support you could have, we're in different timezones and the support team managed to take the issue with no problem at all.

Thanks for your awesome service!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

Great module, well maintained and supported. We had a few requests, the team delivered no questions asked and we're quite picky I tell you. Great job!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

We've tested many such modules and this one is the first to actually bring correct Enhanced Ecommerce analytics data. While most deliver the functionality, the support engineers at Anowave had put a thought here and ensured that tracking data is not only there but is also correct.

Building marketing campaigns based on false data costed us thousands! Beware!

I'd like to thank you for the awesome module, kind help desk and support delivered!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

We have tried similar modules but none of them is even close to what this module does, the huge amount of work here is obvious, module handles enhanced ecommerce tracking perfectly and the developers have put a lof ot efforts to handle caching bottlenecks, special character issues, proper GDRP/Consent implemenation etc.

We find this solution perfect for our needs. Thank you team Anowave!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

The module worked just fine, we had a performance issues initially but this was due to our categories hierarchy (over 150000+ categories). With little help from the team, now everything is fine!

Superb service!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

Superb module!

We have tried the module on several different themes for different clients and it worked a charm, no issues whatsoever!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

This is a solid module, does everything it says. We chose Anowave, because they have this module for both Magento 1 and 2 and the transition that we did recently went smoothly. Support is superb!

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

This is a great product and I can't thank the team enough for their support with the configuration - I'm a non techie and when I needed the XPath locators tweaking, the team were straight on it. I'm really grateful for all the support. Can't recommend this highly enough.

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

I highly recommend this module and the team supporting it!!! We had really hard times getting GTM set correctly, tried a few modules and they worked initially but then we found that data was often incomplete, incorrect or even worse, some broke our theme and success page and it took us days to figure.

This module works out of the box, it does everything it says and for the time being we're not experiencing any issues whatsoever.

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

this is the best Magento plugin for GA and FB and it does what it promised. Their support is fast and fantastic.

Yes, I recommend this product

Purchased Magento 2 Google Tag Manager Enhanced Ecommerce (UA/GA4) Tracking

We were originally looking at buying this module because it supported Google Analytics 4 (GA4) with the upgrade module while also supporting Enhanced Commerce... we were then happy to discover that a few weeks later that the developer had also announced support for the incredible Hyva theme! Combine this with the fact that it supports Google Customer Reviews, Meta/Facebook Pixel, and uses the Google API to streamline configuration and setup with your Google account and we could not be happier!

Yes, I recommend this product

Note: By submitting a review you agree to our Terms and Conditions.





User Guide & Documentation

Installation from Command Line (Recommended)

This extension can be installed in a few minutes, by going through the following steps:

  • Download/purchase the extension
  • Unzip the file in a temporary directory
  • Copy directory contents and paste it in your Magento installation root directory. This extension will not replace existing code or file structure
  • Enter the following at the command line:

    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy (only if site is in production mode)

 

 

dataLayer[] Preview

This extension cannot be evaluated online, but we have prepared a preview of the dataLayer[] object throughout an ecommerce site.

 

 

 

Configuration

Before configuring the module you may need:

Your Google Analytics UA-ID
UA-ID can be obtained from your Google Analytics account in Admin -> Tracking info -> Tracking code

Your Google Tag Manager Account ID
Account ID can be obtained from your Google Tag Manager account in Admin -> Account settings

Your Google Tag Manager Container ID (numeric representation)
Container ID can be obtained through the module itself

 

To configure the module go to your Magento Admin -> Stores -> Configuration -> Anowave Extensions -> Google Tag Manager and configure the following:

  1. 1. Insert your license key. To obtain a license key watch the short video link next to the license key input
  2. 2. Insert your GTM snippet. GTM snippet can be obtained from your Google Tag Manager account in Admin -> Install Google Tag Manager
  3. 3. Insert your Universal Analytics ID
  4. 4. Save configuration
  5. 5. Once configuration is saved, expand section called "Google Tag Manager API"
  6. 6. Click "Sign in to Google" and authorize the application. You will be redirected back to your Magento admin interface
  7. 7. Insert your Account ID
  8. 8. Insert your Universal Analytics ID and leave Container ID empty
  9. 9. Click "Save config". Upon saving, you will get redirected back to same page
  10. 10. Go again to "Google Tag Manager API" section. You can now pick your container ID from the dropdown.
  11. 11. Click "Save config". Once configuration is saved 4 checkboxes will appear in "Google Tag Manager API" section.
  12. 12. Check all 3 checkboxes e.g. Create variables, triggers and tags. You can also check Create Universal Analytics tag if you don't have such tag yet
  13. 13. Set Throttle to 0.2 and Click "Save config". Operation could take a while so be patient.
  14. 14. Once the process completes, find all tags/triggers and variables automatically created in your account at Google Tag Manager
  15. 15. Publish your container version. This is important, otherwise created tags will not fire. You have to publish changes after every update to your tags, triggers or variables
     

Find below a few screenshot(s) of how to use the Google Tag Manager API.

 

Google Tag Manager Tag Configuration

Unlike other similar solutions, this product comes with full support for Google Tag Manager API allowing you to create all tags, triggers and variables in an instant with the click of a button, directly from Magento admin panel. The extension will do all the hard work automatically hence why tag specification has been omitted in this documentation.

 

Watch a quick video on YouTube - https://www.youtube.com/watch?v=U8dK95FRP1w

 

Google Analytics configuration

To get proper Enhanced Ecommerce, Google Analytics should be configured as well. There are 2 keypoints here

1. Enable Enhanced Ecommerce

To enable Enhnaced Ecommerce go to GA -> Admin -> E-commerce settings -> E-commerce Setup and enable Ecommerce and Enhanced Ecommerce reporting

2. Configure Funnel

To configure funnel steps go to GA -> Admin -> E-commerce settings and under Checkout labeling enter the following steps:

Step 1 - Shipping
Step 2 - Payment
Step 3 - Place order

Note that if you use 3rd party checkout solution, steps could be different. In this case, contact helpdesk for further clarification

 

How to test if tags are actually working

There are essenatially 2 types of tags. The first type of tags are those sent on Pageview. They include information that is gathered upon page load and sent automatically with the GA Pageview. The other type of tags are those fired after the page is loaded. They usually require user action such as click of a button etc.

To learn more about testing tags visit https://support.google.com/tagmanager/answer/2695660?hl=en

Previewing in debug mode allows you to check which tags are fired and which are not fired. If a certain tag isn't fired then make sure it's configuration matches the required one described in this documentation. (See Tag configuration).

 

AdWords Conversion Tracking & AdWords Dynamic Remarketing

To configure AdWords, check the steps/guide outlined below.

1. AdWords Conversion Tracking

In our extension configuration screen go to AdWords Conversion Tracking tab and insert your conversion id and conversion label (obtained from AdWords). 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. AdWords Conversion Tracking is built-in in our module for customer ease.

2. AdWords 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 AdWords)
b) Go to GTM -> Variables and edit "ee conversion label" variable. Insert your conversion label (obtained from AdWords)
c) Publish new container version

This will activate AdWords Dynamic Remarketing.

 

Facebook Pixel Configuration

Facebook Pixel tracking is built-in, you do not need to create any tags in GTM itself. Configuration is simple and it only requires you to insert your Facebook Pixel snippet in module's config screen under Facebook Pixel Tracking panel. Once snippet is inserted, the module will automatically insert the FB snippet on your pages and fire events such as AddToCart, Purchase, RemoveFromCart etc. automatically.

 

Promotions & Promotion tracking

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.

  1. data-promotion-creative="squareBanner"
  2. data-promotion-name="Square Banner"
  3. data-promotion-position="1"
  4. data-promotion-id="SQUARE_BANNER"

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.

 

Advanced Developer Configuration / Selectors

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

 

Cookie Consent / GDPR

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.

 

Cookie Consent Configuration

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 Universal Analytics tag that fires on all pages will still fire. To prevent this, you need to change the tag trigger from 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 Universal Analytics tag trigger should be reverted back to "All pages", otherwise it won't fire thus losing essential tracking data such as page views, transactions etc.

 

Developer reference

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

 

Performance optimisation

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.

 

Assessing installation and tracking

 

Assessing the installation is important part of ensuring that tracking works and it covers all aspects of enhanced ecommerce. There are multiple ways to assess the installation, but we will describe the most common ones.

 

1. Assessing as customer

As a customer you may not have coding skills so there are a few simple steps to follow. We have outlined them below.

  1. 1. Go to your Google Tag Manager account and check if you have created all tags, triggers and variables
  2. 2. Check if you have published your container
  3. 3. Run your container in "Preview" mode and go back to your site.
  4. 4. Browse pages such as Home Page, Category, Product detail page and ensure that Universal Analytics tag fires on all of them.
  5. 5. Click on a product from your categories and ensure that "Product click" event appears in the GTM preview console (bottom of the browser)
  6. 6. Click on "Add to cart" button and ensure "Add to cart" event is fired. Follow the same procedure for "Remove from cart"
  7. 7. Go to Checkout, and see if checkout steps are tracked (again by looking to the preview console).
  8. 8. Place an order and click on the dataLayer from the preview console. Ensure that dataLayer[] object contains all the data such as revenue, transaction, products array etc.
  9. 9. Play with the entire site when in preview mode and ensure that dataLayer[] object is initialized as per the specification descrived here - https://developers.google.com/tag-manager/enhanced-ecommerce
  10. 10. Last but not least, contact our support engineers and ask them to evaluate the installation.

2. Assessing as developer (advanced)

As a developer you could use some tools to assess the installation. We have outlined them below.

  1. 1. Assess the installation as customer (see pt. 1 above)
  2. 2. Open browser's developer console and inspect AEC and dataLayer objects. They should be defined.
  3. 3. Monitor network and requests made to https://www.google-analytics.com/collect?v=
  4. 4. Inspect elements such as category images, add to cart buttons etc. for data-* attributes such as data-id, data-brand, data-catgory etc.
  5. 5. Make sure GTM is inserted only once in the page HTML source
  6. 6. Make sure standard Google Analytics is turned off entirely.

 

Considerations

Even properly installed the extension may fail to send data to Google in certain cases. See below possible situations that may result in data loss:

  1. Transaction tag(s) are fired on order confirmation page and if for any reason the customer doesn't get to confirmation page, NO transaction data will be recorded.
  2. Some customers reported doubled amount of transaction value. This could happen if GA transaction tracking is enabled in Magento. It will in effect send transaction data twice resulting in incorrect transaction amount reported in Google Analytics. Our recommendation is to disable all 3rd party extension related to GA and leave stuff to GTM. It's main purpose is to allow site owners to add features to the site without editing code whatsoever.
  3. Inaccruate bounce rate has been repored on few occasions. This usually happens when there are more then one tag fired on 'pageview' with results in sending data twice to Google thus bounce rate getting lower then 1%. To test if your site doesn't sent 'pageview' twice to Google, use browser's console and search for requests containing the keyword "collect" There should be only 1 such request per page view.
Installation

Now: Next:

If you like this product, share it with your friends



Extensions for Magento

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 that we offer extend the capabilities of Magento and provide a bespoke functionality. They also fill some missing gaps in the functionality provided by the base platform and help customers in chosing Magento as prefered ecommerce platform.

The extensions that we offer are part of our full range Magento service which includes also a Premium Helpdesk where customers get to speak with actual software engineers and get their issues resolved without hussle. Premium labeled modules also include free installation, confiuration, testing etc.