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.
Download the MagePal Google Universal Analytics JSON Import Template File and do the following:
Open Google Tag Manager Admin.
Navigate to Admin > Container > Import Container.
Click Choose container file and select the json file (GTM-MagePal_universal_analytics.json).
Under Choose workspace, click Existing or New (Enter a title and description, then click Save).
Select one of the following actions to import the file:
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 “Google Analytics Settings”. Then, update the placeholder (UA-xxxxxxx) with your own Google Universal Analytics 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.