Update time: March 16, 2026
This article explains how to install Google Analytics 4 (GA4) and introduces four common implementation methods.
Method 1: Install GA4 Using gtag.js
This method involves deploying the gtag tracking code directly in your website’s template without using Google Tag Manager (GTM).
First, copy the GA4 tracking code from your property.
Then log in to your server, locate the <head> section of your website template, and paste the code there.
If you don’t have server access, simply send the code to your developer and ask them to deploy it on the site.
Read More:Installing Google Analytics 4 with gtag
Method 2: Install GA4 with Google Tag Manager (Most Recommended)
I highly recommend using Google Tag Manager to deploy GA4.
From the previous step, we know the Measurement ID is G-4X87W9BLM3.
In GTM, click「Variable」——「New」——「Choose a variable type to begin setup…」——「Constant」, name it “Measurement ID”, and then make the following settings:
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:
Read More:Deploy Google Analytics 4 with Google Tag Manager(2025)
Method 3: Connected Site Tags
This method allows one GA4 property to forward data to another GA4 property.
To use this approach, the source GA4 property must be implemented using gtag.js.
You can configure this setting in「Manage connected site tags」——「Web stream details」:
Method 4: Send Data to Multiple GA4 Properties
If you want to send data to multiple GA4 properties simultaneously, you can use the group parameter in gtag.js.
This approach currently only works with gtag implementations.
For example, when deploying GA4 normally, the configuration looks like this:
<span style="font-size: 12pt;"><a href="https://www.bbccss.com/tag/gtag" title="Read more Articles about gtag" target="_blank">gtag</a>('config', 'G-HZ4RDGTX66');
</span>
By default, this uses the default group:
<span style="font-size: 12pt;"><a href="https://www.bbccss.com/tag/gtag" title="Read more Articles about gtag" target="_blank">gtag</a>('config', 'G-HZ4RDGTX66', { 'groups': 'default' });
</span>
Both configurations have the same effect.
To send data to multiple GA4 properties, you can configure different groups:
<span style="font-size: 12pt;"><a href="https://www.bbccss.com/tag/gtag" title="Read more Articles about gtag" target="_blank">gtag</a>('config', 'GA_MEASUREMENT_ID-1', { 'groups': 'group1' });
<a href="https://www.bbccss.com/tag/gtag" title="Read more Articles about gtag" target="_blank">gtag</a>('config', 'GA_MEASUREMENT_ID-2', { 'groups': 'group2' });
</span>
If you want to send an event to GA_MEASUREMENT_ID-1, the event code would look like this:
<span style="font-size: 12pt;"><a href="https://www.bbccss.com/tag/gtag" title="Read more Articles about gtag" target="_blank">gtag</a>('event', 'generate_lead', { 'send_to': 'group1' });
</span>
In theory, this setup might also be possible using GTM, but I have not successfully tested it yet.



