This App uses Google Tag Manager to push event tagging to Google Analytics 4. During the installation you will create a Google Tag Manager account and import pre-built tags and variables. These tags will be able to push event tracking data to your Google Analytics 4 account.
Uninstall Old Google Scripts
Make sure you don't have any other Google Analytics or Google Tag Manager scripts on your site. Remove them before you start. Go to Admin → Settings → Search Engine Optimisation.
Also check your Header and Footer blocks. Go to Admin → Appearance → Theme Options
Install the Google Analytics & Google Tag Manager App
Setup the App
Setup the app called "Google Analytics Enhanced Ecommerce" in the Admin → App Store.
Set the Google Tag Manager ID
Set "denied" for both consents to prevent cookies from being set by default
Enable the app by clicking save
👍 Important: If you don't setup the cookie tracking widget, you will need to set "Granted" for the consents you need. Otherwise, you will be blocking all tracking by default.
Google Tag Manager
Follow these steps to get even more from integration of the store and Google Analytics.
Step 1
The first thing to do, if it's not created yet, is to create a new "Google Tag" with the Google Analytics Measurement ID as "Tag ID" value. Example: G-XXXXXXXXXX. Then add the trigger "All Pages" to this tag.
Add your Google Analytics Measurement ID
How to find your Google Analytics Measurement ID
Step 2
The next step is to create a new User-Defined Variable in Variables menu. The variable name is "Measurement ID EvoX", the variable type must be "Constant" and the value is the Google Analytics Measurement ID.
👍 Important: If the variable isn't named "Measurement ID EvoX" then your imports won't work. See above details.
Step 3
Once we have the Google Tag and the new variable created, we can now start to import all the events or just the events that we need.
👍 Important: You have two options to choose from. Either you import all Events or you can simply choose the Events that you need. See the details below.
Option 1: Import All Events
Use this if you are doing a new install from scratch.
👍 Important: Don't forget the publish your changes after importing
Download All Events: all_events.json
Go to Admin > Import Container
👍 Important: Always choose "Merge > Overwrite conflicting tags, triggers and variables".
Option 2: Import only some Events
Use this if you only need to add some Events. The Gif gives an example of how to import individual events. You can repeat the process for any number of events that you need to add to your container.
👍 Important: Don't forget the publish your changes after importing
👍 Important: Always choose "Merge > Overwrite conflicting tags, triggers and variables".
Events
Below are a list of events, the individual download files are contained at the end of this article.
View Items List - when a user is presented with a list of results
Select Item - a user selects an item from the list
View Item - whenever a user views an item’s details screen
Add to Cart - item being added to a shopping cart
Remove from Cart - a user removes an item from a cart
Add to Wishlist - an item is added to a wishlist
View Cart - a user subsequently views the cart
Begin Checkout - first step in a checkout process
Add Shipping Info - user adds shipping information in checkout
Add Payment Info - user submits their payment information
Purchase - checkout completed
No Search Results - when there is no results in search page
Quote Email - when a quote is sent to a user
Quote Request - when a quote is requested by the user
Contact form - when and which contact form is submitted
👍 Important: Don't forget the publish your changes after importing
How to set up your Contact form tracking
Tracking user interaction with your contact form is vital for understanding how effectively your website engages visitors. Here’s a quick guide to set up tracking for your contact form.
Step 1:
Navigate to appearance -> Layout and choose the page in which you want to add your contact form widget.
👍 Important: If you plan to feature multiple contact forms on your website—whether they're custom-designed or default templates—it's crucial to assign each a unique name in the 'Widget Name' field if you wish to identify them in Analytics.
Step 2:
Follow the guide above this section and import the contact form containers.
Download: contact_form_sent.json and contact_form_failed.json
Step 3:
All that's left to do is see the changes happening in Google Analytics.
If you wish to quickly check the feedback in Analytics, from the Home page go to Reports->Real-Time, scroll down and check under Events.
If you click on the event you should be able to see the Contact form name you used to identify the Widget.
In this case I named it 'Default Contact Form' but you can name it anything you'd like.
Download All Events container:
Download Container Files Individually:
Setup the Cookie Consent Widget
That's it, have a Great Day!! 🚀