Skip to main content

How do I link my Google Tag Manager and my Google Analytics GA4 account - Knowledgebase / Global Settings - ShopFactory Help Center

How do I link my Google Tag Manager and my Google Analytics GA4 account

Authors list

In this article, we will show you how to link your Google Tag Manager with your Google Analytics GA4 account.

Once you have set up your Tag Manager and Analytics accounts in ShopFactory it is time to link them to each other.

1) To link the accounts you will need to import a Container file in your Tag Manager.
The file that you need can be downloaded here: https://shopfactory.com/contents/media/GTM-XXXXXXX_workspace.json (clicking on this link will open the file in your browser, you need to right-click with your mouse inside the page and select the “Save as / Save page as” option and save GTM-XXXXXXX_workspace.json file in your Downloads folder

2) Now go to your Downloads folder and open the GTM-XXXXXXX_workspace.json file in Notepad.

3) Go to line 61 and replace G-XXXXXXXXXX with your own Measurement ID (the easiest way to find your GA4 Measurement ID is by typing measurement ID in the Google Analytics Search bar, you can copy your ID from the search result)

4) Save the file and close it

5) Login to your Google Tag Manager account at https://tagmanager.google.com/

6) Go to the Admin section:

7) In the Admin section click on “Import container“ on the right-hand side of your screen

8) In the next screen you select your container file by clicking on “Choose container file“.

Then you select if you want to add the Container to a New or an Existing Workspace (if you already have an existing workspace you can choose Existing, otherwise you should select New, if you select New please enter a name for the Workspace in the next screen and click Save to return to the previous screen)

The next thing to do is to select if you want to Overwrite or Merge the content of the container. For a new workspace it does not matter what you select here, for an existing workspace it is important to make the correct decision, if you are not sure what to select please contact your IT partner that manages your Tag Manager account before importing the file.

9) After you have selected the file to import and selected the Workspace and Import option you will see the screen below. Click confirm to Import your Container file

10) In the next screen click on Submit on the top right to Publish your workspace and click on Publish on the top right in the next screen

That’s all.

If you need any help with this installation please contact us at sf14@shopfactory.com and we will be happy to give you a quote for this