Skip to main content
Google Tag Manager and Google Analytics 4 (GA4)

How to set up Google Tag Manager and Google Analytics

Cecilia Wagner avatar
Written by Cecilia Wagner
Updated over 9 months ago

Google Tag Manager can be used to manage tracking tags, pixels, and beacons on your TIME Sites sites. If you have proprietary code snippets or integrations that are not yet offered by TIME Sites, this is the best way to add them to your TIME Sites sites safely. Think of Google Tag Manager as an administrative interface to set up and manage Google Analytics, or any other tracking apps which Google Tag Manager supports.

This article provides step-by-step instructions for provisioning Google Analytics via Tag Manager (since this is the most common tracking strategy.)

If you need help integrating other tracking apps into your TIME Sites site, contact us for support, or refer to the support articles provided by Google Tag Manager.

Step 1: GA4 Measurement ID from your Google Analytics account

1. Login to your Google Analytics account. If you are new to Google Analytics, you can sign up for an account and follow the prompt to create your first Google Analytics property (meaning, a website with a unique tracking code for analytics reporting).

After logging in, make sure to choose Click the gear “admin” button on the bottom of the left-side menu:

2. Here, decide if you want the website to be in its own unique account, or be a property of an existing account.

• If this website should be in its own account, click on Create Account and follow the steps. Then move to the next bullet point and create a property.

If this is a new website you want to be a part of an existing account, click on Create Property. Otherwise select the site from the drop down and jump down to step 4.

3. Set up your new property. Select to measure your website, and click continue at the bottom. Fill out the property details on the next screen and press create.

4. After creating a property, create your Data Stream by selecting the Data Stream tab and selecting Web.

2. Enter your website URL and Stream Name and click Create Stream.

3. You will then be provided with your Measurement ID.

Step 2: Configure Google Tag Manager

1. Login to Google Tag Manager. Click on “Create Account” and name it.

2. Next, you'll create a “container” which will hold all the tracking apps for a specific website. Give it a name, and select "Web":

Once you’ve created your container, you’ll be presented with the head and body code for your container, associated with a unique container ID (“GTM – XXXXXXX”).

(The code will remain fixed for that specific container and its associated website, even if you add additional tracking apps to the container later.)

Now that you have the head code, you can paste it into the Website Settings for your TIME Sites site. However, before leaving Google Tag Manager, we will first complete some additional necessary steps.

3. Exit the code window and click on "New Tag":

4. From New Tag Page, click on “Tag Configuration”, and choose your Tag Type.

5. Select Google Analytics: GA4 Configuration.

6. To setup add a GA4 tag, enter the Measurement ID that you created in your Google Analytics account.

7. Now click on the Triggering icon and select All Pages to setup tracking on all pages. Then hit Save.

8. Back at the Container “Workspace” page, on the right-hand side, you’ll see a box that indicates “Container Not Published”. To publish the Container, click on the “Submit” button in the upper right. (IMPORTANT: Your website won’t start tracking until you’ve “published”your Container!)

9. Enter a Version name and description (e.g. what Tags have been added for tracking, etc.) and then click “Publish”.

Step 3: Paste the container code into the Website Settings

If you did not copy the Tag Manager Code Snippet when it was first generated, it can always be found either by clicking the Container ID at the top of the Workspace page (“GTM - XXXXXX”), or clicking on “Admin” and then clicking on the “Install Google Tag Manager” gear in the center of the Admin page.

Copy the entire head code only (not the “body” code.)

Within TIME Sites, open the Website Settings by clicking "Studio" -> "Website Settings" and selecting the "Google Tag Manager" tab within the pop-up dialog. Paste your code into this window.

Your TIME Sites site should now be all set for tracking Google Analytics or whatever other tags have been enabled for this particular site in Google Tag Manager! If you return back to your Google Analytics page, you will be able to view the tracking of your site.

Tracking Anchor Links with Google Tag Manager

If your page relies on anchor links (within-page navigation) and you'd like to be able to track clicks on those links using Tag Manager, you can refer to this article for a step-by-step walkthrough of how to set up your tracking.


Did this answer your question?