Google Analytics 4 is a new type of property which includes different reports than the ones Google has gotten us used to with Universal Analytics. Google Analytics 4 can be used for Websites, Apps or both at the same time, whereas Universal Analytics can only be used for Websites. In this day and age, information is key to pretty much everything, which means that keeping your existing Universal Analytics Property and setting up a new GA4-based property to run in parallel can elevate your information game to new heights and assure you make the most informed, data-driven decisions when steering your store into the future.
Our extension helps open up this this new platform to Magento 2 with an integration that's easy to set up and deploy. It brings the powerful functionality and ease of use of our popular Google Analytics Enhanced eCommerce UA GTM Tracking extension to the GA4 platform so you can get ready for stepping into the future.
Optional
Copy the extension files into the below path of your Magento 2 instance. If the ‘app/code/WeSupply’ folder
is missing, please create it manually:
app/code/WeSupply/Toolbox
If you experienced any issues or limitations with this quick GUI installation, see also SSH Installation below. SSH installation does the same thing but you are required to issue the commands step by step via CLI. Some servers may have high security configurations and may limit the functionality of this GUI Installer.
Optional
Copy the extension files into the below path of your Magento 2 instance. If the ‘app/code/WeSupply’ folder
is missing, please create it manually:
app/code/WeSupply/Toolbox
The Hyvä Theme frontend is basically built from the ground up, most traditional Magento 2 modules need to be extended to ensure they work properly in conjunction with Hyvä. We provide these adjustments via an addon, which is basically another extension you can install to ensure the full functionality of the Google Analytics 4 PRO module are available with the Hyvä frontend.
The steps for installing the Google Analytics 4 (GA4) Hyvä Theme Compatibility Addon are the following:
php bin/magento module:enable WeltPixel_HyvaGA4
You need also to get the code for the "<body>" section.
For this you need to go to WeltPixel > Google Analytics 4 Ecommerce > GTM API Configuration and fill in the Account ID, Container ID and Measurenent ID fields. All this information can be found in your Google Tag Manager and Google Analytics accounts.
The Measurement ID is available under GA account > Admin > Data Streams > *Select your Stream* > Measurement ID as you can see in the picture.
The Tag, Trigger and variable generation works via a JSON generation process. The JSON is generated in Magento based on your settings, after which it's imported into Google Tag Manager.
Note: After making any extension configuration changes, remember to re-generate the JSON and re-import and overwrite the existing GTM container to ensure your settings are picked up by Google.
Go to WeltPixel > Google Analytics 4 Ecommerce > JSON Export Options , fill in your Public ID (it can be found in your GTM account) and hit the Generate Json for Variables, Triggers and Tags button.
You will be notified that the JSON has been generated successfully and a Download JSON button will appear. Click the button to download the generated JSON.
Go to your Google Tag Manager Dashboard and access the Admin section and choose Import Container
Click on the Choose container file button and find your previously generated and downloaded JSON file. Then, choose a workspace (you can choose an existing workspace or create a new one) and an import option.
When importing your container, you will have the option to merge the imported content with the selected workspace, or overwrite the workspace entirely. Overwriting the selected workspace will remove all your existing tags, triggers and variables in that workspace, and will replace them with the imported container.
After importing the generated JSON, a preview will show up letting you know the number of changes made to the container. There should be Tags, Triggers and Variables created or updated in various amounts depending on your Magento Admin settings. Click on Confirm and you should be done with importing your settings!
If you have the PRO version, make sure you do the following setup:
Note: If you are using Client Side Tracking in conjunction with Measurement Protocol, make sure that you only track events on one side or another. For example, by having the “purchase” tag enabled on client side as well as via measurement protocol, 1 transaction will be triggered twice and it will result in duplicate transactions. You can check this by going to Google tag Manager -> Tags -> Select the Tags that you added in Track Events and click Pause (example image below)
Note: If you've enabled the Automatically disable data layer for enabled measurement protocol events option, you can skip this step.
Note: Ensure you don't disable the main Analytics Tag, labeled WP - GA4, as this tag is required for tracking sessions, page views and other important user metrics.
Woohoo, the extension is configured!
Note: Your GA and GTM account are now configured with our pre-generated settings and ready to receive valuable information from your Magento 2 store! You can now gather valuable data and take data driven decisions! Congrats!<a href="#" data-track-promo-id="PROMOID" data-track-promo-name="PROMONAME" data-track-promo-creative="PROMOCREATIVE" data-track-promo-position="PROMOPOSITION">Content </a>
For details about how to use Google Analytics 4's DebugView to confirm your data is correctly making it into Google Analytics, check out this article on our Support Center: How to preview and monitor Google Analytics 4 events using Debug View?
What’s new in v.1.11.17 - Feb 9, 2023
What’s new in v.1.11.15 - Feb 1, 2023
What’s new in v.1.11.14 - Jan 10, 2023
What’s new in v.1.11.11 - Nov 11, 2022
What’s new in v.1.11.9 - October 7, 2022
What’s new in v.1.11.7 - September 1, 2022
What’s new in v.1.11.5 - August 17, 2022
What’s new in v.1.11.1 - April 25, 2022
What’s new in v.1.10.17 - October 22, 2021
What’s new in v.1.10.15 - August 31, 2021
What’s new in v.1.10.11 - July 7, 2021
What’s new in v.1.10.9 - May 18, 2021
What’s new in v.1.10.7 - March 26, 2021
What’s new in v.1.10.5 - February 4, 2021