Computing and Gadget, Development, Service & Support, Information and Reviewers, Technology Sectors, Website & Design

Google Analytics 4 for Beginners Chapter 1

 

In late 2020, Google rebranded its App + Web (Universal Analytics) properties to Google Analytics 4 and officially came out of beta (at least that’s what Google says). This means that from now on the default property (on creation) is GA4. It is a completely renewed platform (compared to previous versions). New interface, new tag model in Google Tag Manager, new data model, etc.

This raises many questions: where to start? What should be the ideal configuration?

If you’re not sure how to get started, you’ve come to the right place. Because in this Google Analytics 4 tutorial, I’ll show you the exact first steps you need to take.

What will you learn in this article?

The article has been divided into 4 main parts:

How to correctly install Google Analytics 4
How to track events with Google Analytics 4 (and where to find this data in the interface)
How to track conversions with Google Analytics 4 (and where to find this data in the interface)
Resources on reporting with Google Analytics 4

This Google Analytics 4 tutorial will be a bit long due to the number of options and configurations that the tool has, however, you can bookmark this page and come back later to continue reviewing the article if you do not finish reading now 🙂

 

Chapter I: Install Google Analytics 4 with Google Tag Manager

In this chapter, we will see one of the basic (but fundamental) topics: how to install Google Analytics 4. And we will do it through Google Tag Manager.

This is the process of how to install Google Analytics 4 with Google Tag Manager:

Create a new GA4 property
Create a data flow
Copy measurement ID (or tracking code)
Create a Google Analytics 4 Settings Tag
Paste the tracking code and set the tag to fire on all pages.
Preview/test the new label
Publish changes to Google Tag Manager

#1.1. If you are using the older version of GA

What if you are currently using Universal Analytics (the old version of GA) on your website? Should I get rid of this version entirely and replace it with Google Analytics 4? Better to use both?

Universal Analytics tells us that on July 1, 2023 it will stop receiving information, so we are all required to migrate/pass to version 4 of Google Analytics as soon as possible.

So let’s learn how to install Google Analytics 4 with Google Tag Manager.

#1.2. Create a Google Analytics 4 property and dataflow

If you want to create a new Google Analytics 4 property, go to the “Admin” section of your Google Analytics interface (by clicking “Admin” in the bottom left corner) and then (in the “Property” section) click on Create property.

Enter the name of your property below. It could be the name of your website, your company, a brand, etc. Choose the country of your business/website, the reporting time zone, and the primary currency in which your business operates.

Then click “Next”, answer several questions, click “Create”… so your new Google Analytics 4 property is ready. The next step to perform is to configure your first data flow. The data stream is a data source from which events will be sent to your Google Analytics 4 property.

You can have multiple data sources on a property. For example, 3 web properties, 1 for the Android app, and 1 for the iOS app.

In this article I will focus on a web stream, so click on it.

Next, enter the URL of your website (for example, https://www.xaviersanchez.es/). Note that the security protocol (https ) is already selected. After that, enter the name of your website.

When creating a web data stream in Google Analytics 4, you have the ability to enable or disable enhanced measurement. It’s designed to help marketers include as many events as possible in their reports without having to rely on programmers or configurators like Google Tag Manager.

By default, this feature is enabled and will automatically track the following events:

Page View (event name: page_view )
Scroll (event name: scroll)
Click the outbound link (event name: click with the parameter outbound: true)
Site Search (event name: view_search_results )
Video Engagement (events: video_start, video_progress, video_complete)
File download (event name: file_download )

If you want you can disable/enable the events individually. You can do this by clicking the gear icon in the “Enhanced Metering” section and clicking the toggle buttons.

create a web data stream in google analytics 4

When done, click the “Create Flow” button.

 

#1.3. Install Google Analytics 4 with Google Tag Manager

When creating a data stream (web), you’ll see a measurement ID.

Copy it, as we will use it in Google Tag Manager.

By the way, if you get lost in the GA4 interface and need to revisit this section, go to Admin > Data Streams > choose your most recently created stream and then you’ll be back to the same window you’ve seen in the previous image.

Next, go to the Google Tag Manager containers section (if you haven’t worked with this tool yet, you can see my Google Tag Manager tutorial) > Tags > New and choose GA4 settings.

In the Measurement ID field, enter the ID that you have previously copied to the GA4 interface. Keep the “Send a page view when this configuration loads” event enabled if you want to track page views automatically.

Install Google Analytics 4 with Google Tag Manager

It’s usually wise to keep it enabled, but in some cases, eg single page apps, it’s better to disable the pageview checkbox and just create a separate settings tag.

In the “Trigger” section, select “All Pages” and give the tag a name, for example “GA4 – Page View”.
#1.4. DebugView in Google Analytics 4

Activate GTM preview mode to test your changes (you can do this by clicking a “preview” button in the top right corner of the GTM interface).

After activating it, you will see the new tag GA4 among the active tags.

DebugView in Google Analytics 4

When you set up your events, it’s time to test them. The main function created for debugging GA 4 data is the DebugView section. You can find it by clicking Configure > DebugView on the left side of the GA4 interface.

Most likely you won’t see any data (yet). This is because this data in DebugView is visible ONLY when debug mode in GA4 is enabled. Don’t mix this with GTM preview and debug mode.

They are two different options.

To enable debugging mode in GA4 you have several options (any of them will work for you):

Enable GA Debugger Chrome Extension
Send the debug_mode parameter along with an event
Enable Google Tag Manager preview mode on a page you are debugging (this option is least recommended)

In the case of the first option, install the extension and click on its icon (so you can see the track ON). From this moment on, you will start to see your events by accessing the DebugView.

The other option is to send a debug_mode parameter with each event you want to see in the DebugView.

In Google Tag Manager, you can also do this by opening the GA4 configuration tag and adding the following parameter:

If the debug_mode parameter is set to true, the event will be seen in the DebugView. If you’re using a hardcoded gtag.js, here are instructions on how to include the debug_mode parameter.

But since we’re working with Google Tag Manager, having GTM view mode enabled automatically sets debug_mode to true so that the data starts showing up in GA4 DebugView.

When you start viewing the data in the DebugView, you can click on each individual event to bring up a list with different parameters.

Click on the mentioned parameter to see the value received by GA4.

DebugView in Google Analytics 4

Also, make sure you have selected the correct debugging device in the top left corner.

If multiple visitors have activated the debugging view (for example, everyone has activated the GA Debugger extension), you will see multiple devices.

Anyway, when you start viewing the data in the DebugView, the events will look like this.

 

#1.5. Publish your changes to Google Tag Manager

After verifying that the data is arriving and displaying correctly, you should push the GA4 changes to the GTM container and publish them.

You can do this by clicking on the SUBMIT button that you will find in the upper right corner.

Publish your changes to Google Tag Manager

After that, you should start to see the new data in real-time reports.

#1.6. Google Analytics 4 real-time reports

In the left sidebar of the Google Analytics 4 interface, go to Reports > Real Time. Unlike the previous version (Universal Analytics), the new report offers new options to view data at a much more detailed level.

First, you will see a map and several cards with traffic sources, most popular events, number of users in the last 30 minutes (by the way, Universal Analytics real-time report shows the number of users in the last 5 minutes), etc. .

You can also take a look at the real time section of an individual user. You can do this by clicking the View User Snapshot button in the top right corner.

Google Analytics 4 real-time reports

You’ll then see a sequence of all the events for that particular user, so you can click on any of them (just like in DebugView) to see things at a more detailed level. If you want to see another user/visitor, you can click on the button that you will see in the following image:

Google Analytics 4 real-time reports

To exit this option, you simply have to click on the Exit Snapshot button in the upper right corner.

#1.7. Frequent questions

Here are some additional questions you may have that I’d like to address.

What if I already have the Google Analytics 4 tracking code added to the source code of your website?

I recommend implementing GA4 (or any other JavaScript-based marketing/analytics tool) through Google Tag Manager due to its flexibility. My Google Tag Manager Beginners course covers the process and offers tips on migrating coded tools to Google Tag Manager.

You can also read my article that talks about Google Tag Manager along with its features.

 

If I already have Universal Analytics implemented in Google Tag Manager, do I need to create a new GTM container for Google Analytics 4?

No, you don’t need to create a new GTM container just for Google Analytics 4. You can use the existing Google Tag Manager container for the new version of GA. Google Analytics 4 uses completely different GA tags, but they can coexist with Universal Analytics tags in the same container.

After installing Google Analytics 4 on your website, the next step is to implement event tracking. They are the backbone of your GA setup. Every interaction you want to measure is an event.

Related Posts