Google Analytics 4 (GA4) is the current version of Google's data analytics tool. To get your VTEX store browsing data from Google Analytics 4, you need to:
As of July 1, 2023, Google Analytics 4 will replace Universal Analytics, the previous version of the tool. Therefore, you need to follow this tutorial to make the necessary adjustments to your store. See details about the change in this Google announcement.
Configuring Google Analytics 4
If you were using the previous version of Google Analytics (Universal Analytics) in your store, you need to add a GA4 property. To do so, follow this Google documentation: Add a Google Analytics 4 property (to a site that already has Analytics).
If your store does not have the previous version of Google Analytics configured, follow the instructions in this Google documentation: GA4 - Set up Analytics for a website and/or app.
In both cases, save the Google Analytics property ID code in the G-xxxxxxx
format obtained from Google Analytics. It will be used in the next step during Google Tag Manager configuration.
Configuring Google Tag Manager
Once you have configured the necessary settings in your Google Analytics account, you will need to change Google Tag Manager settings in the VTEX Admin to track your store events. To do so, follow the steps described in Configuring Google Tag Manager.
If your store uses VTEX IO - Store Framework, in addition to the setup, you will need to configure a new version of the Google Tag Manager app. For more information, see Installing Google Tag Manager.