Google Analytics 4 + Google Tag Manager Settings
Get More from Magento With Google Analytics 4
Google Analytics 4 + Google Tag Manager Settings

Google Tag Manager Account Setting & Configuration

The quickest way to configure your Google Tag Manager Container is to use our pre-config json import file which simplify the process by importing and auto generate all the tags, events and variable in your GTM container. For additional information, see Google’s Container export and import which provide more instructions on how to import a sample JSON to a new container.

Google Tag Manager Import

Download the MagePal Google Analytics 4 JSON Import Template File and do the following:

Google Tag Manager Import

The Overwrite option should be selected for the new container. The Merge option should be selected is you are using an existing container. Click Preview to review the tags, triggers, and variables.

To edit the Google Analytics ID that is referenced in variables, do the following:

Navigate to Variables > User-Defined Variables.

Choose “MagePal GA4 - MeasurementId”. Then, update the placeholder (G-xxxxxxx) with your own Measurement ID.

Follow Google’s instructions to add tags, triggers, and variables to the new container.

If you have settings in another container that you want to use, they can be moved to the new container.

Click Confirm when complete.

Follow Google’s instructions to publish the new container.

Google Tag Manager + Google Analytics 4 JSON Import Template

Related

Related Extensions

Get more from your Magento2 store!

Enhanced Success Page

Add cross-sell, upsell, related products, social media links and other elements to your order confirmation.

Magento Enhanced E-commerce

If your are using Magento + Google Analytics, then you need Enhanced E-commerce for Google Tag Manager.

HTML Minifier for Magento2

Minification is the process of removing all unnecessary characters and spacing from your source code without changing its functionality.