Update time: June 5, 2025
In 2020, Google released Google Analytics 4, which is actually the name change of APP + Web. It can track App and Web at the same time, aggregate data into the same property, and use all data in one report. This is a big change.
When APP + Web first released the Beta version, it could only be created through the Firebase console. Although it is still in beta, it can now be created in Google Analytics, which is more convenient.
Let’s take a look at the process of creation and deployment.
Create GA4 Property
In GA4, click 「Admin」——「+Create」——「Property」:
Create Property
- Property name: Generally fill in the domain name of the website.
- Reporting time zone: Fill in your time zone.
- Currency: Select the currency type.
After configuration, click 「Next」.
Business Details
- Industry category(Required): Select the industry type of the website.
- Business size (Required): Select number of employees
After configuration, click 「Next」.
Business objectives
This setting will mainly generate some built-in reports for different industries. Choose according to your needs:
After configuration, click 「Create」.
Data collection
- Website URL: Set the homepage address of the website.
- Stream name: Set the name of the website.
- Enhanced measurement: Some of the built-in tracking can be achieved only by checking, which is very convenient.default is to select all, you can remove it according to your needs.
After setting, click「 Create & Continue」to create Data Stream.
Data Stream is set up, this is the detailed information of the data stream.
- STREAM URL: The default address of the website.
- STREAM NAME: Site name.
- MEASUREMENT ID: similar to Tracking ID.
- STREAM ID: similar to Tracking ID.
MEASUREMENT ID and STREAM ID are similar to Tracking ID, but MEASUREMENT ID can only be used in the Web, and STREAM ID can only be used in APP.
Deployment Method(4 Easy Ways)
The next step is the deployment method. There are many deployment methods.
gtag
This method is to deploy the gtag tracking code directly to the template page of the website without using GTM.
Copy this code, log in to the server, find the head position of the template page, and paste it.
If you don’t have server permissions, please send this code to the developer’s notice and let them help deploy.
GTM(Most Recommended)
I most recommend using this method of deployment.
Configure GA4(Google Tag)
From the previous step, we know that the measurement ID is G-4X87W9BLM3. Create a Constant variable to store it for later reuse.
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:
Preview and Test
Next is the preview test. Click 「Preview」 in the upper right corner.
It will open the Tag Assistant:
- 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” and it will open the website. You will see Tag Assistant Connected in the lower right corner of the website, indicating that it has successfully entered the test state:
Return to Tag Assistant and find Window Loaded in Summary. You can see that the configured GA4 Tracking Code is triggered:
This means that the configuration is fine.
You can also verify it in GA4‘s Debugview and real-time reports, where you can see the data.
Publish
If there are no problems with the test, you can publish it.
In GTM, click 「Submit」——「Publish」 the upper right corner to publish.
Read More:Deploy Google Analytics 4 with Google Tag Manager(2025)
Connected Tags
This method is to forward data from one GA4 to another GA4, and the first GA4 needs to be deployed using the gtag method to achieve this.
The setting location is in「Manage connected site tags」——「Web stream details」:
Send Data To Multiple Properties
To send data to multiple properties at the same time, you need to use the group parameter to set it, and only supports the use of gtag
When we deployed, the code to send data to the measurement ID was:
<span style="font-size: 12pt;">gtag('config', 'G-HZ4RDGTX66'); </span>
The default is default, written as:
<span style="font-size: 12pt;">gtag('config', 'G-HZ4RDGTX66', { 'groups': 'default' }); </span>
The effect of these two writings is the same.
If you want to send data with two measurement IDs, the correct one should be:
<span style="font-size: 12pt;">gtag('config', 'GA_MEASUREMENT_ID-1', { 'groups': 'group1' }); gtag('config', 'GA_MEASUREMENT_ID-2', { 'groups': 'group2' }); </span>
If you want to send an event to GA_MEASUREMENT_ID-1, the event tracking can be written like this:
<span style="font-size: 12pt;">gtag('event', 'generate_lead', { 'send_to': 'group1' }); </span>
I think it can also be implemented on GTM, but I haven’t tested it successfully.
For more information, please refer to: https://developers.google.com/gtagjs/devguide/routing