How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

Google Analytics 4 BCS 7 years ago (2019-11-03) 4117 Views 0 Comments

Update time: March 13, 2026

In this article I will show you how to deploy Google Analytics 4 through Google Tag Manager.

Step 1: Set Up Google Tag Manager

Creates GTM Container

First things first — you need a container in GTM. Think of a container as the workspace where all your tracking codes live.

In GTM, click「⋮」——「Create Container」:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

Then see the setting interface of the Create Container:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

  • Container Name: Usually your website domain. I use http://www.bcs.com here.
  • Target PlatformChoose Web for a website.

Finally click 「Create」 to create a new container.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

That’s it. Your container is ready.

 

Install the GTM Code on Your Website

Now you need to install the GTM snippet. This is the one part where you might need developer help — but it’s a one-time thing.

in GTM, click「Admin」——「Install Google Tag Manager」:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

You’ll see two code snippets — one for the <head> and one for the <body>.

Both need to be added to every page of your website. Usually, you’d add them to your site template.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

A quick heads-up: If you don’t have server or template access, you’ll need to ask a developer for help. It’s a 5-minute job for them — just share the two code snippets.

 

Test the Installation

Before moving on, make sure GTM is loading correctly. Note that GTM won’t work until you publish at least one version — if you skip this, you’ll get a 404 error when the container tries to load.

In GTM, click 「Submit」——「Publish」 the upper right corner to publish.

Open Developer Tools , click Network, and then filter with “GTM”. You can see that GTM’s JS can be loaded normally, and the status is 200, indicating that the deployment is fine.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

 

Step 2: Create a GA4 Property

Now let’s set up the destination — your GA4 property.

In GA4, click 「Admin」——「+Create」——「Property」:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

Create Property

Configure the following settings:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

  • Property name:  I recommend using your website domain — keeps things organized
  • Reporting time zone:  Choose your local time zone
  • Currency:  The currency you want reports in

Click 「Next」.

 

Business Details

GA4 will ask for some information about your business:

  • Industry category (Required): Pick the one that best describes your business.
  • Business size (Required): Choose the employee count range.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

Click「Next」 after filling these in.

 

Business objectives

GA4 uses these to recommend reports and insights.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

Select the options that match your goals, then click Create」.

 

Data collection

In this step, you will create a Data Stream:
How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide
GA4 supports three types of data streams: IOS, Android and Web, Multiple streams can send data to the same GA4 Property.

Create a Data Stream

GA4 needs a data stream to know where data is coming from. GA4 supports three types: Web, iOS, and Android. You can have multiple streams sending data to the same property.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide
  • Website URL:  Your homepage URL
  • Stream name:  A descriptive name for this data source
  • Enhanced measurement: Enabled by default — this automatically tracks page views, scrolls, outbound clicks, and more. You can disable anything you don’t need.

Click「 Create & Continue」to create Data Stream.

Data Stream Details

Once created, you’ll see the stream details. Two values are important:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

  • MEASUREMENT ID: This is used for web tracking.
  • STREAM ID: an internal ID, primarily used for app tracking.

Copy the MEASUREMENT ID. You’ll need it in the next step.

 

Step 3: Connect GA4 to GTM

Store the Measurement ID

First, let’s store the Measurement ID in a GTM variable so we can reuse it easily.

In GTM, click「Variable」——「New」——「Choose a variable type to begin setup…」——「Constant」, name it “Measurement ID”, and then make the following settings:How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

Create the Google Tag

In GTM, click「Tags」——「New」——「Choose a tag type to begin setup…」——「Google Analytics」——「Google Tag」, name it “GA4 Tracking Code”, and then make the following settings:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

 

Step 4: Preview and Test

This is the most important step. Never publish without testing first.

Click 「Preview」 in the upper right corner.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

It will open the Tag Assistant:

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

 

  • Your website’s URL: Enter the domain name to be tested. Here, it is https://www.bbccss.com
  • Include debug signal in the URL: Uncheck

Finally, click “Connect” , Tag Assistant will open your website. Look for the “Tag Assistant Connected” banner in the bottom right corner — that means you’re in preview mode.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

Go back to Tag Assistant and find Window Loaded in the Summary. You should see your GA4 Tracking Code tag listed as triggered. If it shows as triggered, the configuration is working.

How to Set Up GA4 with Google Tag Manager: A Step-by-Step Guide

 

Step 5: Publish

If everything looks good in testing, it’s time to publish.

In GTM, click 「Submit」——「Publish」, Add a version name and description (e.g., “Initial GA4 deployment”).

That’s it. GA4 is now live on your site through GTM.

 

Final Words

I know this looked like a lot of steps when you started reading, but most of them are one-time configurations. The GTM container creation, the GA4 property setup, the data stream — you do these once and they’re done. The only thing you’ll repeat is testing and publishing, and that gets faster every time.

This guide covers the basic web setup. If you need to track iOS or Android apps, the process is similar but with different stream types and a few extra configuration steps. And if you’re looking to go further, I’ve written guides on more advanced topics like setting up custom dimensions, tracking form submissions, and configuring ecommerce events.

Like (0)
Post my comment
Cancel comment
Expression Bold Strikethrough Center Italic

Hi, you need to fill in your nickname and email!

  • Nickname (required)
  • Email (required)
  • Website