Saturday, April 20, 2024
No menu items!
HomeData Analytics and VisualizationGoogle Analytics 4 Tutorial for Beginners

Google Analytics 4 Tutorial for Beginners

In late 2020, Google renamed its App + Web properties to Google Analytics 4 and officially graduated from beta (at least, that’s what Google is saying). This means that from now on, the default property (when you create it) is GA4. It is a completely revamped platform (compared to the previous versions). New interface, new tag template in Google Tag Manager, new data model, etc.

This raises many questions: where to get started? What should be the optimal setup?

If you are 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 + I’ll give you some further directions.

 

Table of contents

+ Show table of contents +

What are you going to learn in this blog post?
Chapter I: Install Google Analytics 4 with Google Tag Manager
#1.1. If you are currently using the older version of GA
#1.2. Create a Google Analytics 4 property & Data Stream
#1.3. Install Google Analytics 4 with Google Tag Manager
#1.4. DebugView in Google Analytics 4
#1.5. Publish your changes in Google Tag Manager
#1.6. Google Analytics 4 Realtime reports
#1.7. Frequently asked questions

Chapter II: Track Events with Google Analytics 4
#2.1. Bye-bye to Event Category, Action, and Label
#2.2. Four categories of events in Google Analytics 4
#2.2.1 Category #1. Automatically tracked events
#2.2.2 Category #2. Enhanced Measurement
#2.2.3 Category #3. Recommended events
#2.2.4 Category #4. Custom Events

#2.3. Test your events in GA4
#2.4. Where can I find event data in GA4 reports?
#2.5. How to plan your events in GA4
#2.6. Event limits in Google Analytics 4

Chapter III: Track Conversions with Google Analytics 4
#3.1. What is a conversion in general?
#3.2. Goodbye, goals. Hello, conversions!
#3.3. Predefined Conversions
#3.4. Conversions that can be switched on
#3.5. Create events and mark them as conversions
#3.6. Or try planning a better event naming convention
#3.7. Check the data in Google Analytics DebugView
#3.8. Where can I see the conversion data in GA4 reports?

Chapter IV: Reports in Google Analytics 4
Final Words

 

Video tutorial

In addition to this blog post, I have also recorded a video tutorial on my Youtube Channel.

IMPORTANT: Since the video was recorded, some parts of the GA4 interface have changed. So keep that in mind.

You will find All Events section in Configure > Events
Conversions are in Configure > Conversions
Engagement reports are in Reports >Engagement
Analysis Hub is now called Explorations

You will learn the most if you consume both types of content: read this blog post and watch the video. They complement each other.

 

What are you going to learn in this blog post?

I have split the article into 4 main chunks:

How to properly install Google Analytics 4
How to track events with Google Analytics 4 (and where to find that data in the interface)
How to track conversions with Google Analytics 4 (and where to find that data in the interface)
Resources on how to build reports with Google Analytics 4

We have lots of things to cover, so if you don’t have enough time now, you can bookmark this Google Analytics 4 tutorial and come back later.

 

 

Chapter I: Install Google Analytics 4 with Google Tag Manager

In this chapter, we’ll take a look at one of the basic (but fundamental) topics – how to install Google Analytics 4. And we’ll do that with Google Tag Manager. Here’s the process of how to install Google Analytics 4 with Google Tag Manager:

Create a new GA4 property
Create a data stream
Copy the Measurement ID
Create a Google Analytics 4 Configuration tag
Paste the Measurement ID and set the tag to fire on All Pages
Preview/test the new tag
Publish the changes in Google Tag Manager

 

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

What if you are already using Universal Analytics (the older version of GA) on your website? Should you ditch it completely and replace it with Google Analytics 4? Should you use them both?

To answer that, I have published a blog post (and a video tutorial) on this topic.

In a nutshell, if you are reading this blog post in 2021 or maybe even early 2022, chances are that Google Analytics 4 is still not mature enough to be used as a standalone web tracking platform. Hence you should use both tools (UA and GA4) at the same time.

But if you are reading this blog post in late 2022 or even more in the future, it will probably be enough to completely switch to Google Analytics 4.

And now, let’s learn how to install Google Analytics 4 with Google Tag Manager.

 

#1.2. Create a Google Analytics 4 property & Data Stream

If you want to create a new Google Analytics 4 property (and you are not upgrading to GA4), then go to the Admin section of your Google Analytics interface (by clicking the Admin at the bottom-left corner) and then (in the Property section) click Create Property.

Then enter the name of your property. It might be the name of your website, of your company, a brand, etc. Choose your company’s country, reporting time zone, and the main currency that your business operates in.

Then press Next, answer several questions, click Create and your new property will be ready. The next step to complete is to configure your first data stream. It is a data source from which events will be sent to your Google Analytics 4 property. You can have multiple data sources in a single property. For example, 3 web properties, 1 for Android app, and 1 for an iOS app.

But in most cases where you track websites, it is enough to have just one web stream (even if you track several websites with it).

In this blog post, I will focus on a Web stream. Select it.

Then enter the URL of your website (for example, https://www.mywebsite.com). Note, that the protocol (https) is already selected. After that, enter the name of your website.

When you create a web data stream in Google Analytics 4, you have an option to enable/disable Enhanced Measurement. It is designed to help marketers get as many events in the reports as possible without the need to cooperate with developers or configure them in 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)
Outbound link click (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 events individually. You can do that by clicking the gear icon in the Enhanced Measurement section and then clicking toggle buttons.

When you’re ready, press the Create stream button.

 

#1.3. Install Google Analytics 4 with Google Tag Manager

When you create a data stream (web), you will see a Measurement ID.

Copy it. We’ll need to use it in Google Tag Manager.

By the way, if you ever get lost in the GA4 interface and you need to revisit this page, go to Admin > Data Streams > choose your most recently created stream, and then you will return to the same window that I have displayed in the screenshot above.

Then go to your Google Tag Manager container (if you haven’t worked with it, here’s a tutorial on how to get started) > Tags > New and choose GA4 configuration.

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

Usually, that’s ok keep it enabled but in some situations, e.g. on single-page applications, it is more recommended to disable the pageview checkbox and create just a standalone configuration tag. You can read more about that here.

In the Triggering section, select All Pages and then name the tag, e.g. GA4 – Pageview.

 

#1.4. DebugView in Google Analytics 4

Please memorize this part of the blog post. I will refer to DebugView multiple times throughout the entire article because it’s an essential part of making sure that your data was properly sent to Google Analytics 4.

Enable the GTM preview mode to test your changes (you can do that by clicking a big PREVIEW button in the top-right corner of the GTM interface).

Once you enable it, you should see the new GA4 tag among tags that fired.

When you configure your events, it’s time to test them. The primary feature built for debugging GA 4 data is the DebugView section. You can find it by going to Configure > DebugView on the left side of the GA4 interface. Click it.

Most likely, you will not see any data there (yet). That’s because that data in the DebugView is visible ONLY when the debug mode in GA4 is enabled. Do not mix this with the GTM Preview and Debug mode. They are two different beasts.

To enable the debug mode in GA4, you have several options (any of them will work):

Enable the GA debugger Chrome extension
OR send a debug_mode parameter together with an event
OR have enabled Google Tag Manager’s Preview mode on a page that you’re debugging. To me, this one is the most convenient.

In the case of the first option, install the extension here, and then click its icon (so that you can see the ON ribbon). From this moment, you will start seeing your events coming into the DebugView.

The other option is to send a debug_mode parameter with every event that you wish to see in the DebugView.

In Google Tag Manager, you can do that 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 DebugView. If you are using a hardcoded gtag.js, here are the instructions on how to include the debug_mode parameter.

But since we are working with Google Tag Manager, having the GTM Preview mode enabled automatically sets the debug_mode to true, thus the data will start appearing in the GA4 DebugView.

When you start seeing data in the DebugView, you can click on every individual event and then a list of parameters will be displayed.

Click on that parameter to see the value that was received by GA4. Now that is some granular debugging!

However, I have noticed some delays between the event actually happening on a website and then appearing in DebugView. Sometimes, I have to wait for several minutes until the data come in. That’s a bit unfortunate and hopefully, the team behind Google Analytics 4 will improve this in the future.

Sometimes, refreshing the DebugView’s page helps too.

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

If multiple visitors have enabled the debug view (e.g. they all have enabled the GA Debugger extension), you will see multiple devices there and it might require some time to find yourself. This especially applies to my blog, when many of my readers have enabled the GA Debugger Extension and I have to guess which device (out of the other 15) is mine

Anyway, once you start seeing data in DebugView, things will look like this.

 

#1.5. Publish your changes in Google Tag Manager

Once you made sure that the data is coming in and it is displayed properly, you should submit your GA4 changes in the GTM container and publish it.

You can do that by clicking the SUBMIT button in the top right corner and then complete all the other steps that the user interface asks you to do.

After that, you should soon start seeing the new data coming in your real-time reports as well.

 

#1.6. Google Analytics 4 Realtime reports

On the left sidebar of the Google Analytics 4 interface, go to Reports > Realtime. This is where you will see the data coming into your reports. Unlike in the previous version (Universal Analytics), the new report offers you capabilities to see the data on a much more granular level.

First, you will see a map and a bunch of cards with traffic sources, most popular events, the 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).

You can also take a look at the snapshot of an individual user. You can do that by clicking the View user snapshot button in the top right corner.

Then, you will see a stream of all events of that particular user, you can click on them (just like in the DebugView) to see things on a more granular level. If you wish to look at another user/visitor, you can click the button here:

To exit the snapshot, simply press the Exit snapshot button in the top right corner.

 

#1.7. Frequently asked questions

Here are some additional questions that you might have and I wanted to address.

What if I already have Universal Analytics installed on my site? Please refer to my blog post on how to upgrade to Google Analytics 4. But a short version is that you can use both GA versions at the same time. In the long run, the recommendation of having both versions might change.

What if I already have Google Analytics 4 tracking code hardcoded in the website’s source code? I would highly recommend implementing GA4 (or any other JavaScript-based marketing/analytics tool) via Google Tag Manager because of its flexibility. Click here to learn more about GTM benefits. But a short version goes like this: your developers should remove the hardcoded tracking code from your website and you should implement Google Analytics 4 via Google Tag Manager. My Google Tag Manager Course for Beginners covers the process and tips on how to migrate hardcoded tools to Google Tag Manager.

If I already have Universal Analytics implemented in Google Tag Manager, should I 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. Use your existing Google Tag Manager container for the new GA version as well. Google Analytics 4 requires completely different GA tags but they can definitely co-exist with Universal Analytics tags in the same container.

======

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

And when we move towards conversion tracking, you will learn that conversion in GA4 is just an event with some VIP status.

 

 

Chapter II: Track Events with Google Analytics 4

After you have installed GA4, it’s time to start collecting additional data.

P.S. it might be a good time to bookmark this Google Analytics 4 tutorial. We still have lots to cover and if you don’t have enough time, come back whenever you’re ready again.

 

#2.1. Bye-bye to Event Category, Action, and Label

Compared to Universal Analytics, a.k.a. UA (the previous Google Analytics version), the data model in Google Analytics 4 is much more flexible. This means that there are fewer restrictions and required fields/parameters compared to the UA.

The most notable difference regarding events is 4 parameters that you could send together with every event to Universal Analytics (excluding custom dimensions):

Event Category (required)
Event Action (required)
Event Label (optional)
Event Value (optional)

And when you open the Universal Analytics event reports, you’d first see the Event Category. Then you can click it and drill down deeper (to see action and then label).

In Google Analytics 4, the naming convention is much more flexible and it solely depends on the person who is implementing the tracking setup.

In GA4, there is a parameter called Event Name, and then everything else depends on what you have planned. If you wish, you can send no additional parameters. Or you can send 4 additional parameters that better describe the context of that event. For example, let’s say that someone filled in the “Request demo” form on your website. You could send the following event:

Event name: request_demo
product_nameamazing product
company_size99-250
company_industry: internet and telecom
annual_revenue: 50-100M

The last 4 items in the list above are custom parameters that you can send together with an event. However, keep in mind that there are some limits regarding the number of custom parameters that you can send with a single event. I will mention them additionally later in this article.

While you can come up with any events you want, there are some recommendations that you could follow. But first, let’s take a look at 4 categories of events in GA4.

If you are not sure how to name/structure your events, I will give you some hints later in this e-book + a spreadsheet template. But first, let’s learn about various types/categories of events in Google Analytics 4 and how you can create/modify them. I believe that it’s important to have a good understanding of events in GA4 before we start thinking about the structure.

 

#2.2. Four categories of events in Google Analytics 4

In GA4, events can be split into 4 categories:

Automatically collected events
Enhanced Measurement events
Recommended events
Custom events

The process of how you should plan the structure of your events (names and parameters) is by doing the following:

Check if the event that you want to track is among the automatically collected events
If not, then check if your event is mentioned among the Enhanced Measurement events (e.g. scroll or file_download)
If not, then check the recommended events and their naming convention
If none of the above categories apply to your events, create a custom event with an event that you want

In the upcoming 4 mini-chapters of this blog post, I will explain where to look and how to find the category of your event. And once you get more familiar with events (and how to configure them), I will share some tips (and a sample spreadsheet) that can help you think about the structure of your events and a naming convention.

To sum up, here is the process of how Google Analytics 4 event tracking works:

Identify if your event is automatically tracked.
If not, then create a GA4 event tag in Google Tag Manager
If needed, include events parameters too
Check the incoming events in the DebugView of GA4
Register event parameters as custom dimensions
Publish all changes in Google Tag Manager

Let’s take a closer look at those steps.

 

#2.2.1 Category #1. Automatically tracked events

Since I am mostly focusing on web tracking, the same principle will apply to this guide. There are certain events that GA4 tracks automatically. You can find a full list here. On that list, you will find both app and web events. In fact, the list of web events is a bit longer than I’d expect. Enhanced Measurement events are also listed there.

For now, let’s temporarily ignore them and focus only on those events that are automatically captured and should not be added to any other event category. The list of website events goes like this:

first_visit. This is the first time a user visits a website or launches an app.
session_start. When a user engages the app or website and starts a new session
user_engagement. This one is a bit more mysterious. I could not find 100% accurate information about this event. But it looks like this event is fired 10 seconds after the visitor has stayed on a page. But it also might periodically fire while the app is in the foreground. I will update this part once I find more information.

I didn’t mention the page_view here because I added it to the Enhanced Measurement section. Also, if you want to see the app events, you can check them here.

 

#2.2.2 Category #2. Enhanced Measurement

When you configure a web data stream in Google Analytics 4, you have an option to use Enhanced Measurement. It is designed to help marketers get as many events in the reports as possible without the need to cooperate with developers or configure in Google Tag Manager.

If you go to Admin > Data Streams > Select the web data stream, the following window will open where you will see a section called Enhanced Measurement.

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

Page view (event name: page_view)
Scroll (event name: scroll)
Outbound link click (event name: click with the parameter outbound: true)
Site search (event name: view_search_results)
Youtube Video Engagement (events: video_start, video_progress, video_complete)
File Download (event name: file_download)

If you want, you can disable/enable events individually and you can do that by clicking the gear icon in the Enhanced Measurement section and then clicking toggle buttons.

Also, some events can be customized additionally. Let’s take a quick look at each event and their respective settings.

page_view. This event is sent to GA4 when a new page loads or the URL of the page changes without reloading the page (a.k.a. history change events)

scroll. This event is sent to GA4 once per page when a visitor scrolls below the 90% threshold of the page height. Learn more

click. This is an event for the outbound link click (when a clicked link redirects a visitor to another domain. Together with this event, an additional parameter outbound (with value “true”) is sent. The event with this parameter means that there was an outbound link click. Together with this event, a bunch of other parameters is sent: link_classes, link_domain, link_id, link_url. Learn more

If your business operates on several domains, you can go to Tagging Settings (of that very same event stream) > Configure your domains and then enter the domains of your business. All the domains that are listed there will not trigger the outbound link click event.

view_search_results. This event will be sent to Google Analytics 4 if the page loads and the URL of the page contains a query parameter, such as q, s, search, query, keyword. But if you want, you can include more of them (up to 10). Learn more

If the address of your website’s search results page looks like this: https://www.yourwebsite.com/search?key=my+search+term, then you should enter the word “key” (without quotation marks in the settings of the search event). If the URL of the search results contains more useful parameters, you can include them as well.

For example, if the web address  of your search results page looks like this:  https://www.yourwebsite.com/search?key=search+term&results=50, you could include the “results” (without quotation marks) in the 2nd field of the configuration. Then this parameter will be automatically tracked by GA4.

video_start, video_progress, video_complete. Enhanced Measurement is capable of tracking interactions of the embedded Youtube video on your website and then sends “video_…” events to GA4. But those embedded Youtube video players must contain the ?enablejsapi=1 parameter in their URL. And that is not always available on websites. Also, there are many other reasons why Youtube video tracking might not work out of the box, hence you will definitely need some tweaks.

Because of those nuances, I’d say that this automatic video tracking will not work in as many cases as you might think, hence I’d personally vouch for doing that with GTM.

file_download. This event is sent to GA4 when a link is clicked and that link contains one of the following file extensions: .pdf, .xls, .xlsx, .doc, .docx, .txt, .rtf, .csv, .exe, .key, .pps, .ppt, .pptx, .7z, .pkg, .rar, .gz, .zip, .avi, .mov, .mp4, .mpe, .mpeg, .wmv, .mid, .midi, .mp3, .wav, .wma. In other words, if the link opens/downloads a file. Currently, it is not possible to update the list with other extensions in the GA4 interface.

Once you select which events you wish to track, hit Save in the top right corner and then make sure that Enhanced Measurement is enabled (the toggle is blue).

From that moment, your Google Analytics 4 will start automatically tracking the events. See chapter #2.6. of this blog post to learn how to check if your data is coming in properly.

 

#2.2.3 Category #3. Recommended events

As I have previously mentioned in this blog post, when you are trying to pick the name (and the parameters) for your event, first take a look at automatically tracked events (maybe those events are already being tracked), then check the Enhanced Measurement events. If none of those events cover your case, take a look at the list of recommended events. Google has published several pages for different industries:

Generic (for all properties)
Retail/Ecommerce
Jobs, education, real estate
Travel
Games

Check every one of those events and see if any of them match your need.  For example, if you want to track when a user logs in, then you will find the “login” event in the list of “All properties”.

Even though Google Analytics 4 data model is very flexible (and you can use a different event name for login, for example, logged_in), Google recommends that you implement their recommend events when it makes sense to you. That should help Google Analytics’ reports better understand your data and apply it in their Machine Learning capabilities. However, I still don’t know what are those capabilities (at least in late 2020).

Also, for the majority of those recommended events, Google also recommends some parameters. Speaking of the login event, there is a method parameter. If users can log in to your website via email, google login, facebook login, etc., then it might make sense to track the method as well.

If you want to take a look at the example of login tracking, read this.

 

#2.2.4 Category #4. Custom Events

Eventually, we have reached the last category of events in Google Analytics 4. If you want to send an event and it is not mentioned among the automatically tracked events, Enhanced Measurement, or Recommended events, then you can create custom events.

The configuration of Custom events is pretty much identical to recommended events. The only difference is that you will need to come up with your own event names.

For example, if you want to track form submissions of a contact form, the name of the event can be any of these:

form_submission
contact_form
contact_form_submission

Or anything else.

GA4 is completely flexible here. However, there are some limitations when it comes to the maximum length of an event name.  Also, there is a limit of 500 unique event names per GA4 property. If you reach it, Google says that you won’t be able to track any other new events. And at the moment, you cannot delete unused events (which is unfortunate). Therefore, be careful about creating too many unique event names.

Maybe in the future, this situation/limitation will change. Who knows?

So, speaking of custom event tracking, let’s look at the example where we want to measure clicks on menu links on a website.

 

2.2.4.1. Example of a custom event tracking in Google Analytics 4

Note: menu link click tracking trigger conditions differ on most websites (because of different click classes, IDs, etc.). Try to do your best to apply this example.

On a demo website, I have several menu links that I want to track.

First, I need to create a trigger with correct conditions that distinguish any click from a menu link click. Enable Google Tag Manager’s Preview mode and try clicking any of the menu links on a website. Once you do the first link click, you should see the Link Click event in the Preview mode’s left sidebar.

If you don’t see it, you should:

have at least one Just Links GTM trigger activated on a page
or have “File download” or “Outbound links” tracking enabled in your Enhanced Measurement Settings

Let’s say, that you don’t use Enhanced Measurement in GA4. Go to Google Tag Manager > Triggers > New > Just Links. Keep the trigger set on “All link clicks” and save the trigger.

By creating this trigger, we will enable the link-tracking functionality in Google Tag Manager.

Then go to Variables > Configure (in the “Built-in Variables” section) and enable all Click-related variables.

Refresh the preview mode (by clicking the Preview button once again).

Then go to your website and click any of the menu links. Actually, click at least two of them. Return to the preview mode and you should start seeing Link Click events in the preview mode. Click the first Link Click event and go to the Variables tab of the preview mode.

Then click on the second Link Click event. I am currently looking for some variable that I could use to distinguish a menu link click. I don’t want to fire my GA4 event tag on any link click. I want to fire it precisely on a menu link click.

After taking a closer look, I see that both links contain the same Click Classes value, site-nav__link site-nav__link–main. By the way, nav means “navigation” in this context. Great! I will use this in my Just Links trigger.

Go back to the list of triggers in your GTM container and click the previously created trigger for All Link Clicks. We’ll edit it and add a condition: Click Classes contains site-nav__link–main

Save the trigger. Now, it’s time to create a Google Analytics 4 event tag. Go to Tags > New > Google Analytics: GA4 Event. Select your existing GA 4 Configuration tag and then enter the event name. Its value is up to you. Any of the following options are perfectly fine:

menu_click
menu
menu_item_click
menu click
etc.

These are just some of the examples. Since we are working with a custom event, we can name it whatever we want (as long as we follow the limitations of name length, for example).

In my case, I used menu_click event name. But this time, sending just the event name is not very useful. You’d probably want to know which exact menu items are clicked more often. How about we also send the name of the menu item and the URL?

We could do that by sending additional event parameters. Even though you could use parameters that are already mentioned in the documentation of the Enhanced Measurement (like link_url and link_text), let’s create two custom parameters (because I just want to show you how to configure them).

I am going to pass two parameters, menu_item_url and menu_item_name. I made these parameter names up and you can do it too. That’s what the flexibility of the data model offers.

To send custom parameters, you must expand the Event Parameters section in the Google Analytics 4 event tag and then click Add Row.

Enter the name of the first parameter. In my case, that is menu_item_url. In the Value field, I will insert a variable that returns a clicked URL. Luckily, GTM already offers such a variable, it’s called Click URL. Click the Insert Variable button and then select the {{Click URL}} variable.

Let’s add another parameter, menu_item_name. For that purpose, GTM offers another built-in variable, {{Click Text}}. Insert it as well. Since visitors of your website can translate your page, {{Click Text}} value will also change, hence you will see a more diverse list of collected values in your GA4 reports.

If you want to send more parameters, you are free to do that. You can send up to 25 custom parameters with a single event.

Assign the previously created Just Links trigger to this tag. Save the tag. Refresh the GTM Preview mode and click a couple of your menu items. Go back to the Preview mode and click those Link Click events. Check if the GA4 event tags for Menu Link Clicks have fired.

Now, you will need to go to Google Analytics 4 and check the DebugView.

IMPORTANT: even though you will see your custom parameters in Real-time reports and DebugView in GA4, you will not be able to see them in other GA4reports. Unless you register those parameters as custom dimensions in Google Analytics. Read the next chapter of this blog post.

 

2.2.4.2. Important: Register Custom Definitions

This applies to any event parameter that you send to Google Analytics 4. If you want to see/use them in things like Funnel exploration, Free Form, see their reporting cards in standard reports, etc., you must register custom parameters in the GA interface.

In Google Analytics 4, go to Configure > Custom Definitions. Since we sent 2 custom parameters with the menu link click, we must register them both here.

Click the Create Custom Dimensions button and then enter:

The name of the parameter. You can enter whatever you want. This is just how the dimension will be displayed in your reports. You can name it “menu_item_url”, “Menu item URL”, or anything else.
Since we want to apply this parameter only to one event (and not to all events of the same user), we need to select Event
Event parameter. This is where you have to enter its name precisely as you entered it in the GTM tag. If your parameter name is menu_item_url, you must enter it here exactly like that. Don’t worry if the autocomplete feature of that field does not show your parameter yet. Just enter it and save the dimension

Then register a second parameter (in my case, that was menu_item_name) and save it. By the way, I sometimes use the words “custom parameter” and “custom dimension” interchangeably. In general, custom metrics and custom dimensions are both grouped as custom parameters.

And now we wait. Within the next 24 hours, the custom parameters will start appearing in your Google Analytics 4 reports.

Bonus: Sometimes, you might want/need to create/edit events directly from the Google Analytics 4 interface. Well, now you can. Introducing Create Event and Modify Event. You can learn more about them by clicking their respective links.

 

#2.3. Test your events in GA4

Once you configure your events, it’s time to test them. The primary feature built for debugging GA 4 data is the DebugView section. You can find it by going to Configure > DebugView on the left side of the GA4 interface. Click it.

When you start seeing data in the DebugView, things might look like this:

Events are marked with blue icons, conversions with green. Please ignore the fact that I treat menu_click events as conversions. This is just for demonstration purposes

If you click the event, you will see the parameters that were sent together with an event. Click on the parameter to see its value.

Once you made sure that the data is coming in and it is displayed properly, you should submit your GA4 changes in the GTM container and publish it.

You can do that by clicking the SUBMIT button in the top right corner and then complete all the other steps that the user interface asks you to do.

After that, you should soon start seeing the new data coming in your real-time reports as well. Please refer to Chapter #1.6. of this blog post to learn more about Realtime reports.

 

#2.4. Where can I find event data in GA4 reports?

Here are some of the reports where you can find your data:

Configure > Events (this will show just the list of events with counts. Nothing fancy.
Reports > Engagement > Events
Explore (a.k.a. Exploration reports)

But that is not all. Since GA4 is an event-based analytics platform, every report is affected by events that you send (in one way or another). The aforementioned reports are just the most notable examples.

 

“Reports → Engagement → Events” report

Here you will see a list of all events that are tracked by your Google Analytics 4 property. Click on any event to see a bit more detailed view/reports of that particular event.

This is an overview of all events that were sent to your property + a couple of charts. Below them, you will see a list of events and if you click on any of them, you will take a closer look at that event’s data.

 

Explore (a.k.a. Exploration reports, ex Analysis Hub)

This is the place where you will be able to drill down into your data. In the Explorations, you will be able to use reports such as Free Form, Funnel Exploration, Path Exploration, etc.

Here is an example of a Free Form report. Keep in mind that you will need to wait for up to 24 hours for the data to come into your reports. So if you don’t see the data now, be patient.

Let’s say that I want to see how different device categories are interacting with the menu bar of my site. Remember, I set up the menu_click event?

So, let’s go to Explore and click on the Free Form block.

Then in the Variables column, I need to include the menu_item_url custom dimension because I want to see how many clicks did get each menu URL. Click the Plus icon…

…and then find the menu_item_url dimension. Select it and it will be included in the list of possible dimensions in the report.

If you CANNOT see the menu_item_url (or whatever custom parameter are you looking for),  you have to register them as custom dimensions in GA4 first in Configure > Custom Definitions. And then wait for 24 hours until the data appears in the reports. If the reports don’t work properly, wait for even longer.

Then let’s edit the Tab settings. Remove the existing dimensions in the ROWS and include the custom definition that you want to include. In my case, that’s menu_item_url.

In the COLUMNS section, I used the Device category dimension. In the VALUES section, select the metric that you wish to see. I used the Event Count.

Then you will need to filter only to those events that actually contained the menu_item_url dimension. In my case, that is just a menu_click event. That’s why at the bottom of the Tab Settings section, you should enter a filter: Event name exactly matches  menu_click.

That’s it, your report will now display how different device categories are clicking menu items; which ones are the most popular and how many times were they clicked.

Also, don’t forget to change the date range if you need it. You can do that in the top-left corner of the Exploration interface.

You can also use event data in things like funnel reports, but let’s keep it for another tutorial (hopefully) in the future.

 

#2.5. How to plan your events in GA4

Note: This chapter will be just an overview of how you should do it.

Speaking of actual planning, I would say that a spreadsheet is your best friend.

Write down all the events that you want to track and then:
Check whether they fall under the categories: automatically collected, enhanced measurement, or recommended.
If yes, check their naming convention of event names and parameters (dimensions). If not, then come up with your own values. Just keep in mind that there are some limitations related to the length.

If you have a huge list of event names, be aware of another limitation. Currently, you can have up to 500 unique events per property. If you are close to that limit in your spreadsheet, maybe it would make sense to combine some events under the same event name and introduce an additional property (currently, the limit of registered custom parameters are 50 text parameters (dimensions) and 50 numeric parameters (metrics). More about registered properties – later in this blog post).

Here is an example of the spreadsheet with events that you could prepare yourself and then try to pick the right naming convention. You can use it as an example/inspiration to come up with your own spreadsheet. Let’s take a quick overview of the spreadsheet.

There are two sheets:

The first one is for the list of events and what kind of parameters do you want to track together with them
The second one is a list of parameters with their explanations

The first sheet:

In column B, you can just briefly describe an event in plain English
In column A, you should enter the name of the event that you will use in Google Analytics 4. You should pick this name based on the previously described process: check the automatically tracked events, enhanced measurement, and recommended events. If none of the events match yours, then add a custom name. It looks pretty clean to use this principle to name the event, e.g. event_name (all lowercase and connected with an underscore). Event names like “Submitted the Form” will also work, but the all-lower-case-with-underscore looks cleaner (I believe that the term snake-case applies here).
Column C is for type (is it Automatically collected, Enhanced Measurement, Recommended or Custom?).
Column D is for parameters that you want/plan to track with particular events. I did not include default parameters that are automatically tracked with every event: language, page_location, page_referrer, page_title, screen_resolution.

If you are dealing with mobile apps as well, you could include an additional column “Platform” where you could enter “web” or “Android / iOS”.

The second sheet:

Column A is for the parameter name
Column B is for a platform. If you are working just with the website, feel free to remove that column.
Column C is the type (is it Built-in, Recommended, or Custom). Built-in means that it is used by automatically tracked events or Enhanced Measurement. Recommended parameters are for recommended events. Custom parameters are your own unique events.
Column D is for description (in plain English).

IMPORTANT: This spreadsheet is just an example. You don’t have to blindly follow it. If you wish, you can take just some parts and adapt it to your needs.

Once you prepare the plan, then you can track events with Google Analytics 4. Don’t rush too soon. Otherwise, you might face the consequences in the long run.

 

#2.6. Event limits in Google Analytics 4

Another thing to keep in mind that there are some limits (and some are gone (at least for now?). I would always recommend for you to refer to this page when it comes to limits.

Anyway, here are some of the things you should remember now:

There is no limit for events in total (at least for now). In Universal Analytics (free account), the allowed limit of hit per property was 10 million. At the current moment, there is no such limit in Google Analytics 4. But you never know what might happen in the future
You can have up to 500 unique event names per property (Enhanced Measurement events are not counted). So if you have an event called login and also Login, these will be counted as two unique event names.
You can have up to 50 custom dimensions and 50 custom metrics registered in a property. The keyword here is registered. This means that you have to go to Configure > Custom definitions and have them configured there. If you send more custom parameters but they are not registered, you’re fine.
You can send up to 25 parameters with an event
There are some length limits for event names and parameters as well. Both (the event name and the parameter name) must be up to 40-characters-long.

To learn more about the limits, as always, refer to this page.

 

 

Chapter III: Track Conversions with Google Analytics 4

Not all events are equal. Some are more important to a business. Enter Conversions.

 

#3.1. What is a conversion in general?

I realize that some of my readers who read this blog post might be completely new to web analytics and the concept of conversions. If you are one of them, here’s a quick introduction. And if you already know what conversions are, feel free to skip to the next chapter of this blog post.

A conversion is an important interaction that you want your visitors/users to complete. Conversions can be split into micro and macro conversions. An example of a micro-conversion can be a newsletter subscription, a download of a whitepaper, etc.

Micro conversions are usually described as conversions that put your visitors/users one step closer to the main (macro) conversion.

Macro-conversions are the most important interactions, such as a purchase.

By tracking conversions, you can better understand what is working for your business and what isn’t. For example, you can create a segment of your users who have made a purchase and then try to understand what they are doing, what is their behavior, etc. Also, conversions are used to measure the effectiveness of advertising campaigns and then redistribute your advertising budget.

Hopefully, this super-brief introduction gave you a better understanding of this concept.

Now, let’s learn how to actually track conversions with Google Analytics 4.

 

#3.2. Goodbye, goals. Hello, conversions!

Those who have worked with the previous versions of Google Analytics, for example, Universal Analytics, are familiar with the term “Google Analytics Goal”. Basically, that’s how GA was calling conversions in the past.

If you want to treat a page view of the order confirmation page as a conversion, you could create a destination goal. Speaking of other types of Google Analytics goals, you could create goals that:

Were based on events and their parameters
Or that were based on the duration of the session (if a visitor spends more than X minutes on your website)
Or that were based on the number of page/screen views per session

Also, it’s worth mentioning that you could create up to 20 goals per GA view. In GA 4, that limit is 30 conversions per property.

Well, with the rise of GA4, the concept of Google Analytics goals is gone. Now, the most important interactions are called conversions (this term has been adopted by the industry and other marketing/analytics tools for many years and even GA users were often referring to goals as “conversions”).

It’s a welcome cosmetic change that’s been long overdue. However, the name is not the only thing that has changed. Many things are now different in Google Analytics 4 when it comes to conversions:

The way we have to configure them is different
The types of conversions are different (no more out-of-the-box destination,  session-duration, or number-of-pageviews goals)

It’s all about the event now. It’s your job to send them and mark the most important ones as conversions.

Speaking of ways how to configure conversions in Google Analytics 4, there are two options (that you can control) and one that’s predefined. Let’s start with the latter.

 

#3.3. Predefined Conversions

There is a bunch of predefined conversions that you cannot disable:

first_open (applies to mobile applications)
app_store_subscription_convert (applies to mobile applications)
app_store_subscription_renew (applies to mobile applications)
in_app_purchase (applies to mobile applications)
purchase (applies to websites and mobile applications)

Speaking of purchase, here is a guide by Simo Ahava that explains the entire implementation process in great detail.

If you go to your Google Analytics 4 property and then click Conversions (in the left menu), you will see the list of those predefined conversions (they will be displayed there if you have received at least one event of that particular name). If you have only the Web data stream connected to the property, your only default conversion will be purchase (and it that cannot be disabled).

If you have connected any of the app data streams, then you’ll most likely see the rest of the aforementioned conversions too. But since there isn’t much we can configure, that’s all I can say in this chapter.

Now, let’s move to the next group of conversions.

 

#3.4. Conversions that can be switched on

Now, if you want to mark an event as a conversion, you just have to go to the list of Configure > Events (on the left sidebar) and then switch the toggle next to the event that’s important for your business.

So, for example, if you have an event called ebook_downloaded, then you can flip the switch and turn it into a conversion (note: this will apply only to the new data. The events that were collected in the past will not be turned into conversions retroactively).

Alternatively, you can go to Configure > Conversions (on the left sidebar), then press New conversion event and enter the name of the event, for example, ebook_downloaded. There is no difference between entering the name of the event manually and flipping the toggle button in the Configure > Events list. Except that if you decide to flip the switch, you will first need to wait until that event appears in the list.

Once you do that, wait for up to 24 hours, and you will start seeing conversion data in the list of all Conversions.

If you want to find out about other places where the conversion data is available in the Google Analytics 4 interface, jump to chapter #3.8. of this blog post.

 

#3.5. Create events and mark them as conversions

I bet that some of my readers have one question now. What if you don’t want to mark ALL events (of a certain event name) as conversions?

Example: you have a “Thank you” page to which users are redirected when they subscribe to a newsletter. Let’s say that the URL is https://www.mywebsite.com/thank-you/. If I mark page_view event as a conversion, ANY pageview will become a conversion. How can I separate only those pageviews that happened on the /thank-you/ page?

You can either send a dedicated event (with a different name) from Google Tag Manager/Gtag.js, or you can use the Create Event feature in the GA4 interface.

This feature allows you to create a new event based on other incoming events. On the Configure > Events page, click Create Event and then click Create.

Then you will need to enter the name of the custom event. Once again, you can name it whatever you want. Just make sure that the name clearly communicates what it means. thankyou_page_visit might be a good option.

Then let’s move on to the Matching Conditions section. Here we must tell GA4 what kind of event are we looking for. When that particular event will be spotted, then our thankyou_page_visit should be created as well.

In my case, I need to enter the following conditions:

event_name equals page_view
page_location contains /thank-you/

If you want to copy all the parameters from the page_view event to the new event, keep the checkbox Copy parameters from the source event enabled.

If some of the parameter’s name is incorrect and you want to fix it as well, you can Add Modification in the Parameter Configuration section. For example, if an event contains the parameter pricingPlan but you want it to be pricing_plan, you can introduce a new field (and reuse its value) while removing the incorrect parameter (by leaving the New Value empty).

Take a closer look at [[pricingPlan]] in the screenshot above. Double square brackets mean that GA4 will reuse the value of the parameter pricingPlan in that event. Once you save the changes, you will be able to view them in the Real-time reports and the DebugView of GA4.

Also, when you create that new event in GA4 (and you want that to become a conversion), don’t forget to mark that event as a conversion in the Configure > Events page.

If you don’t like to wait for up to 24 hours (because that thankyou_page_visit will not appear in the list of all your events immediately), you can create a new conversion immediately. Click the Configure section on the left sidebar of your GA4 interface. Then go to Conversions.

Then click New conversion event and enter the name of the event that you have just created. Click Save.

That way, you will mark the newly created thankyou_page_visit event as a conversion (without the need to wait for 24 hours until it appears on the Configure > Events page.

 

#3.6. Or try planning a better event naming convention

I’m just continuing the previous chapter of this blog post here.

If we are talking about events that you are sending from the web site’s code or Google Tag Manager to GA4, you could just plan your event naming convention better and create more distinct events.

Imagine that you track various form submissions with the event name form_submission but you want to treat only certain types of forms as conversions. Let’s say that you track contact form submissions, search form submission, and registration form submission events, but you only want to treat the registration form submission as a conversion.

In that case, you could track 3 separate events:

contact_form_submission
search_form_submission
sign_up

And then mark only the sign_up event as a conversion. This, of course, requires more thorough planning upfront but every solid setup starts with one.

 

#3.7. Check the data in Google Analytics DebugView

Once you configure your conversions, it’s time to test them. The primary feature built for debugging GA 4 data is the DebugView section. You can find it at the bottom left corner of your GA4 interface. Click it.

If you need a refresher on how the DebugView works, feel free to revisit chapter #1.4 of this blog post.

Events are marked with blue icons, conversions with green. If you click the event, you will see the parameters that were sent together with an event. Click on the parameter to see its value.

Once you made sure that the data is coming in and it is displayed properly, you should submit your GA4 changes in the GTM container and publish it.

 

#3.8. Where can I see the conversion data in GA4 reports?

Configure > Conversionssection in the left sidebar menu. This place is like an overview of all events that you have marked as conversions.
Acquisition > Traffic Acquisition and then there is a column Conversions in the table
If you have implemented Ecommerce tracking, the data will appear in the Monetization reports
Explore. For example, you can include the metric Conversions in the Exploration report.

 

Chapter IV: Reports in Google Analytics 4

I did not want to make this blog post 20 000 words long, thus I will share links to several other tutorials of mine and you can crunch them later.

Even though I have already mentioned several places where you can find your event data in Google Analytics 4, I have more resources (videos, blog posts) that you might find helpful.

So if you want to get started with Google Analytics 4 reports, look no further:

How to track and report site search with GA4
Free form reports in GA4 (previously Explorations)
How to track and report scroll events in GA4
How to report outbound link clicks in GA4
Funnel exploration reports
Path exploration reports

 

Google Analytics 4 Tutorial for Beginners: Final Words

Google Analytics 4 is a completely different tool (if we compare it to the previous versions of Google Analytics). And this blog post just proves the fact that there’s a steep learning curve ahead.

We were just scratching the surface of GA4 capabilities and the blog post is already ~9000 words long.

If you want to learn more about the platform, then keep an eye on analyticsmania.com and my YouTube channel.

Also, if you want to be able to track various interactions and send them to Google Analytics (or any other marketing/analytics tool that you are using), Google Tag Manager is the best option. But there’s a steep learning curve as well (unless I show you a shorter and more efficient way).

That shorter and more efficient way is my Google Tag Manager Masterclass for Beginners. You can learn more about it here. Not ready to commit to a course? Then take a look at my free ebook below. It’s much more basic but still gives enough info to get started.


The post Google Analytics 4 Tutorial for Beginners appeared first on Analytics Mania.

Read MoreAnalytics Mania

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments