Implement Google Analytics 4 Step By Step(4 Methods) | BCS

Implement Google Analytics 4 Step By Step(4 Methods)

Google Analytics Haran Huang 11 months ago (10-10) 1372 Views 2 Comments

Updated:2020-11

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 Property

Click Admin in the bottom left corner of Google Analytics:

Implement Google Analytics 4  Step By  Step(4 Methods)

Then the Admin management interface will be displayed, the interface is as follows:

Implement Google Analytics 4  Step By  Step(4 Methods)

Property setup

Click Create Property to create a Property,To start setting up, first Property setup.

Implement Google Analytics 4  Step By  Step(4 Methods)

The default is to create Google Analytics 4. If you want to create Universal Analytics, click Show More Options:

Implement Google Analytics 4  Step By  Step(4 Methods)

There are three positions that need to be set:

  • Property name: Generally fill in the domain name of the website.
  • Reporting time zone: Fill in your time zone.
  • Currency: Select the currency type.

Then click Next.

 

Business information

 

Implement Google Analytics 4  Step By  Step(4 Methods)

 

  • Industry category: Select the industry type of the website.  The following two are optional settings, you don’t need to set them.

After setting, click Create to create Property.

Data Stream.Settings

A stream is a source of data for your property. One property can have multiple data streams, each coming from one platform. You can view this data in your reports and in Analysis.
GA4 introduces the concept of Data Stream, which collects data through Data Stream.  Data Stream is somewhat similar to Tracking ID.
The setting of Data Stream is under Property.
Implement Google Analytics 4  Step By  Step(4 Methods)
Click to enter the platform selection, the platform is actually a different device terminal.
Implement Google Analytics 4  Step By  Step(4 Methods)
There are IOS, Android and Web, these three types of data can be directed to the same Property.
Here we choose Web to start setting up data steam.
Implement Google Analytics 4  Step By  Step(4 Methods)
  • 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. There are the following types:Implement Google Analytics 4  Step By  Step(4 Methods)

The default is to select all, you can remove it according to your needs.

After setting, click Create Stream to create Data Stream.

Implement Google Analytics 4  Step By  Step(4 Methods)

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

The next step is the deployment method. There are many deployment methods.

Implement Google Analytics 4  Step By  Step(4 Methods)

 

Page Hard-Coded Deployment

Page hard-coding deployment is to deploy APP+Web tracking code directly to the template page of the website.

Click on Global Site Tag (gtag.js) under Add new on-page tag, this is the tracking code:

Implement Google Analytics 4  Step By  Step(4 Methods)

Copy this code, log in to the server, find the head position of the template page, and paste it.

Implement Google Analytics 4  Step By  Step(4 Methods)

If you don’t have server permissions, please send this code to the developer’s notice and let them help deploy.

 

Deploy Through Google Tag Manager(Most Recommended)

I most recommend using this method of deployment.

My site has already deployed Google Tag Manager, let’s take a look at how to deploy GA4 tracking code through Google Tag Manager. This deployment method requires the use of MEASUREMENT ID, which is it:Implement Google Analytics 4  Step By  Step(4 Methods)

 

Create a Tag in Google Tag Manager, name it GA4 Basic Tracking, select Tag Type  Google Analytics: GA4 Configuration:

Implement Google Analytics 4  Step By  Step(4 Methods)

 

Paste the measurement ID into it.
There are some other settings below, we will ignore them for now, and how to set them later, and then select All Pages as the trigger.

This completes the configuration. The final configuration effect:

Implement Google Analytics 4  Step By  Step(4 Methods)

If the test is OK, it can be posted online.

Connected Site Tags

There is another form of forwarding:

  • One is forwarded from Universal Analytics to GA4.
  • One is to forward from one GA4 to another GA4.

Universal Analytics to GA4

This way is to forward the data in Universal Analytics to GA4. This deployment method requires the use of MEASUREMENT ID, which is it:Implement Google Analytics 4  Step By  Step(4 Methods)

Then click Admin>Tracking Info>Tracking Code>Connected Site Tags in Universal Analytics:

Implement Google Analytics 4  Step By  Step(4 Methods)

Then paste the MEASUREMENT ID into it.

Implement Google Analytics 4  Step By  Step(4 Methods)

 

One GA4 to Another GA4

This deployment method is at the bottom of Additional Settings.

Implement Google Analytics 4  Step By  Step(4 Methods)

This method requires that the GA4 tracking code has been hard-coded on the website, and then its data needs to be sent to another Property. This method can be used.

Assuming that the website has been deployed with GA4 through hard coding of the page, the MEASUREMENT ID used is G-10000, and the data is sent to Property A.

  • Property A: G-10000
  • Property B:

Now create a new Property B, and send the data of the website to Property B, which can be forwarded through Connected Site Tags.

In fact, it is to forward the data of Property A to Property B.

Copy the MEASUREMENT ID of Property A directly, and click on the Connected Site Tags in Additional Settings in Property B:

Implement Google Analytics 4  Step By  Step(4 Methods)

Paste the MEASUREMENT ID to the position of Enter ID.
Click connect to complete the setting, the effect of setting:

Implement Google Analytics 4  Step By  Step(4 Methods)

 

Note: Only those deployed by hard-coding the page can use forwarding.

Send Data To Multiple Properties

The last method is to forward from Property A to Property B, but what do you do if you want to send it to Property A and Property B at the same time?

For example, our site has already deployed APP+Web, and now we need to add a cross-site tracking, then the data will be sent to two properties at the same time. For example, which Property to send an event to, this needs to be identified by a tracker.

In Universal Analytics, we will use Tracker Name. Its function is to ensure that the data sent to different properties is accurate.

There will also be this mechanism in APP+Web, called group. The default is default.

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

Settings on Google Analytics

After deploying the code, we need to return to the Google Analytics Property to do some settings:

Implement Google Analytics 4  Step By  Step(4 Methods)

Mainly set up data storage and usage.

Data Collection

  • Enable Google signals data collection:This is the previous Advertising Features upgrade. You can also use Google’s ID system to achieve cross-device tracking. It is recommended to open.
  • Advanced Settings to Allow for Ads Personalization:The use of authorized data is all turned on by default, and you can turn it off.

Data Retention

The data retention time is two months by default, and 14 months is recommended.

Implement Google Analytics 4  Step By  Step(4 Methods)

Default Reporting Identity

User identification, the default is through UserID and Device, it will take effect only if you deploy User ID, otherwise it is based on device.

Implement Google Analytics 4  Step By  Step(4 Methods)

Of course, there are other settings, such as linking Google Ads and BigQuery.

Reference


If you don't understand, You can leave a comment below or email me (haran.huang@ichdata.com).
Like (1)
Post my comment
Cancel comment
Expression Texture Bold Strikethrough Center Italic Sign in

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

  • Nickname (required)
  • Email (required)
  • Website
(2) friends in the comments
  1. Eagerly Waiting for your Adobe Analytics articles, plz update soon :) thanks again
    Wise2020-10-12 05:26 Reply
  2. haran-huan you are THE Best , thankyou :)
    Wise2020-10-12 05:24 Reply