If you're using our Google Analytics 4 (standard or PRO) extension and are upgrading to a version equal to or newer than 1.12.0, you'll need to reimport your JSON container into Google Tag Manager to refresh the Tags, Triggers and Variables. This version introduces a few adjustments to the dataLayer, which also requires the modification of imported variables.
The process is quite simple, and can be done by following the steps below:
- Head into the extension's Magento Admin configuration and scroll down to the JSON Export Options section.
- Your container's Public ID should already be saved here, however, if it's not, input it (for example: GTM-PPCLJ8N) and click the Generate JSON for Variables, Triggers and Tags button.
- Once the JSON file is generated, click the Download JSON button, which will download a copy of the file to your machine.
- Head over to your Google Tag Manager account, log in and select your container. Click on the Admin button to open up the container settings section.
- Click on Export Container to export a copy of the current container configuration, in case you need to revert back to this version for any reason. This can also be done via the Google Tag Manager interface, by switching between versions.
- Head back into the Admin menu and click on Import Container.
- Upload the downloaded JSON file using the Choose container file option and choose your existing workspace.
- Under Choose an import option, select Merge, and then the option to Overwrite conflicting Tags, Triggers and Variables.
- Click Confirm.
- Use the Preview Mode functionality to preview your website with the updated Tags, Triggers and Variables to make sure everything is firing correctly.
- Once you're satisfied it's all up and running correctly, use the Publish option to apply the changes to the container.