Google Analytics 4 and Google Tag Manager for beginners — CXL Review

This is the part 6/12 in my series reviewing the Conversion Optimization Minidegree, provided by CXL Institute.

Fernanda Leal
12 min readOct 10, 2021

Since the beginning of September, I have received the amazing opportunity to access the Conversion Rate Optimization Minidegree.

Last week, I deep dived into Google Analytics 4 and Google Tag Manager. Here is a brief summary with the main lessons!

Google Analytics 4

According to Google itself, Google Analytics 4, formerly known as “App + Web”, is a kind of property that provides different reports of those offered by traditional Universal Analytics”, already reviewed in the article “Google Analytics for Beginners”.

One of the main advantages of Google Analytics4 (GA4) is that you can use it to collect and analyze data from both websites and applications, which was not possible in Universal Analytics even using Google Tag Manager.

It happens because GA4 adopted the event model used in Firebase. While Universal Analytics (UA) collects data through cookies and counts them as hits, GA4 is event-based and assumes that any interaction can be captured as an event.

What is new in Google Analytics 4?

1. How Basic Settings Work:
By default, the Universal Analytics tracking code only tracked page views. The other events needed to be configured manually, using codes or Google Tag Manager.

In GA4, this functionality has been rebuilt. After installing the tags in your site’s code, in addition to the page views, they are also tracked:

  • Scrolls;
  • Outbound clicks;
  • Site search;
  • Video engagement;
  • File downloads.

2. UI and reports’ organization:
The interface has also been completely rebuild.

3. New identification methods:
In UA, the default was to identify users by or client-ID by third-party cookies. To try to identify users on different devices it was necessary to implement your client-ID. This made data visualization and analysis difficult.

In GA4, the way you define the identity of your users is more flexible, allowing you to decide whether you want to track them by the device only or by User-ID, Google signals, and only then device.

It is noteworthy that, previously, only a few reports relied on the intelligence of Google signals. Now, in GA4, this is the default option.

4. New realtime reports:
The new real-time reports are more dynamic, interactive, and allow the use of segmentation options.

5. Debug View:
Easier to see the chronological order of what is being cracked on your site and identify what is buggy.

6. New audience builder and conversion tracking:
Advanced segmentation options, including the possibility of temporary exclusion of audiences based on time criteria. A great resource for analyzing remarketing campaigns, for example.

7. New funnel and pathing reports:
It is now possible to customize each step of your funnel, change the desired view with trended funnels, define whether your funnels are open or closed, and have access to the average time in each step of the funnel.
In addition, you can view the top 5 next actions at each step of the funnel and view the journey more fully.

8. Free BigQuery Linking:
When you implement GA4, you can already link a big query to export all your data to a platform you want.

Core implementation:

The installation process for GA4 is very similar to Universal Analytics. After creating your account and filling in the initial information, it is recommended that you use Google Tag Manager to insert the code on your website.

To do this, simply access the Google Tag Manager website, click on “Create Account”, and fill the blanks with required information.

After that, Google Tag Manager will provide the code to be installed on your website. All you need to do is click on the icon on the right to copy and paste the code into your website header. This procedure varies depending on the website builder you use, but in general, it’s pretty easy.

Now that Google Tag Manager is installed on your website, you need to install Google Analytics 4 in your GTM account. To do this, press “New Tag” and follow the instructions below:

  • In “Tag Configuration”, click “Google Analytics: GA4 Configuration” and copy the Measurement ID from your GA4 account. This information is available in your Google Analytics account, at: Admin > Data Streams > Measurement ID.
  • In “Triggering”, choose the option “All pages”.
  • In “Untitled tag”, define the name. One suggestion is “GA4 — Global Configuration”.
  • Save.

At the top of the Google Tag Manager homepage, press “Preview” to test and then implement by pressing “Submit”. Reload your website page and access it normally to check if the information is already being transmitted to your Google Analytics property.

Admin overview

GA4 brings some relative changes in the Admin area. That’s why you need to understand the new ownership settings, how views and permissions differ from Universal Analytics, and what the key features of the new generation are.

Highlights:

  • When opening the settings area, the first difference you notice is that there is no views area.
Difference between Universal Analytics and Google Analytics 4
  • It is currently not possible to control user permissions according to streams. Permissions are only granted at the account or property level.
  • In “Data Streams”, you can create new streams to add information coming from other domains or applications.
  • Under “More tagging settings”, you can configure cross-domain settings and create internal traffic rules. It is not possible to use regex and there is a limitation on the number of IP addresses that can be signaled as internal traffic. It is noteworthy that, in this case, internal traffic is not excluded from the reports, but marked as internal traffic.
  • You can create filters in the “Data filters” area, also in the Admin settings. You can include or exclude events. In this session, it is also possible to define the filter state: testing, active or inactive. By setting the state to “testing”, you can check the data before activating the changes. This is what happened in test views.
  • In “Data retention”, you define how long the data will be retained. By default, Google retains data for 2 months, but it is possible to change it to 14 months.
  • In “Default Reporting Identity”, you can define how you want to identify your users: considering only the device or considering the User-ID, Google signals, and device. Unlike Universal Analytics, you can change this option as often as you like without permanently changing your previously saved data.

Setup: events and conversions

One of the biggest changes in GA4 compared to Universal Analytics is how events work.

Universal Analytics uses a data model based on hits, while GA4 uses an event-driven data model. Everything that happens in GA4 is an event, even pageviews.

While events tracked in Universal Analytics followed a clear hierarchy (Category > Action > Label), GA4 simplifies this structure and considers only the event name and its respective parameters.

It is possible to register up to 25 parameters per event. A video event, for example, can have name, action, type, author, etc. as parameters.

Best practices:
☑ Use lowercase;
☑ Use underscores instead of spaces;
☑ Consider following the event guide provided by Google;
☑ Consolidate event names and reuse parameters;
☑ Register your parameters as custom dimensions;
☑ Create conversions where applicable.

How to create an event:

  • In Google Tag Manager, click on “New tag”.
  • In “Tag configuration”, choose the option “Google Analytics: GA4 Event”.
  • In “Configuration tag”, choose the global tag previously configured by you.
  • In “Event name”, choose the name of the event. If the event has been tracheal previously, keep the same name and the same parameters. You can use this guide to access events that are automatically collected.
  • In “Triggering”, press “+” and then click on “Trigger configuration” to define when you want your event to be triggered.

To track different page scroll percentages, for example, you should use the following parameters:

  • Event name: scroll
  • Parameter name: percent_scrolled
  • Value: {{Scroll Depth Threshold}}
  • Trigger configuration: Scroll Depth
  • Check the option “Vertical Scroll Depths”
  • Click on “Percentages” and define the percentages that you want to track. Use comma to separate different values. For example: 10, 25, 50, 75, 100.
  • Specify the pages where the triggers goes on and save.

After creating the event, you will also need to register it as a custom dimension. Otherwise, the event won’t show up in your reports, only in BigQuery.

To register, go to “Configure” > “Custom definitions” > “Create custom dimensions”.

  • In “Dimension name”, choose the name that defines the event.
  • In “Scope”, choose the option “event”.
  • In “Event parameter”, use the same parameter created in Google Tag Manager.

Conversions:
To create conversions, you must go to: “Configure” > “Conversions” > “Create new conversion”.

In case you make a mistake when performing the configuration, you can use the “Modify conversion” field to correct.

Highlights:

  • The new events model is what makes GA4 so different than Universal Analytics;
  • Automatic measurement will often need to be customized;
  • You need to use custom dimensions and metrics to register your parameters;
  • Create/Modify events is one new way to create customized conversions.

Reporting: standard reports and analysis module

The reports displayed in GA4 are quite different from the Universal Analytics reports. Here are the main highlights:

  • By default, website pages are displayed with the title and not the URL. You can customize this view.
  • Events and conversions also appear in engagement reports and can be customized.
  • Secondary dimensions can be added by clicking on the “+”.
  • The “Edit comparisons” option allows you to change the primary dimension and create custom segmentations.
  • In the “Explore” tab, you will find advanced reports that can be built by you. In addition to finding the reports you’ve already saved, you’ll also have access to a gallery of templates.
  • In “Path analysis”, you can choose the starting point or the ending point.

Reporting: Segments and Audiences

Segments and audiences are extremely useful and can help you answer questions such as “What percentage of users have purchased a particular product?” or “how many users took a certain action?”. To access the audiences, you need to go to “Configure” > “Audiences”.

To create an audience, you can adopt two ways: click on “New audience”, in the “Audiences” tab, or create a new audience from the reports available in “Explore”.

In practice: creating an audience from “Explore”

  • Click on “Blank analysis”;
  • Click on the “+” next to the “Segments” area.
  • You can create segments from users, sessions, or events. After defining your criteria, you will see how many users match that segment.
  • If you want to transform the segment into an audience, just check the option “Build an audience” and press “Save and apply”.
  • It is noteworthy that the audiences published on GA4 can be used on Google Ads, which is quite powerful.
  • In GA4 it is also possible to create a conversion from an audience, which makes the customization options much more advanced.

Extra resources:

BigQuery:

Google Signals and User-ID:

E-commerce:

Firebase:

Privacy:

Google Tag Manager For Beginners

Taught by the brilliant Chris Mercer, the “Google Tag Manager for beginners” course aims to explain how Google Tag Manager works and how to use it in the most assertive and strategic way possible for your business.

Here is a brief summary of the main highlights of the course!

What is it for and why use it

According to Google, Google Tag Manager (GTM) is “a tag management system that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website or mobile app.”

Basically, GTM allows us to track specific behaviors being adopted on the site without relying on developers. It is noteworthy that the tool provides integrations with Google products and platforms developed by third parties, such as Facebook Ads, PayPal, InfusionSoft, etc.

Google Tag Manager x Google Analytics:

As discussed in the article “Google Analytics for Beginners: an (almost) illustrated guide”, Google Analytics collects data, stores data, and builds reports. Despite this, its great specialty is storage.

Google Tag Manager, in turn, is Google’s most suitable tool for data collection. In addition to having integration with various platforms, GTM also allows the collection of more specific data, such as the time spent viewing a page or the time spent watching a video, for example.

How to install GTM:

The GTM script is installed in two parts: one in the head of the site and one in the body. To install it on WordPress, Chris Mercer indicates the plugin “Google Tag Manager for WordPress”.

In general, the GTM script will appear at the highest possible part of the page. If you perform an A/B test, however, it is recommended that the GTM script appears right below the script that triggers the test.

Getting to know GTM — the basics:

Tags (“what”):
Quite simply, a tag is a piece of code that tells Google Tag Manager what data it should collect on your site’s pages.

There are two types of tags: built-in and custom HTML tags.

Triggers (“when”):
While tags tell you what information you want GTM to collect, triggers tell you “when”.

When accessing the triggers area in GTM, you will see that the tool itself already provides the main types of triggers:

  • page view triggers;
  • click triggers;
  • user engagement triggers.

Variable (“information needed”):
The variable is the information the GTM needs to collect the data.

To collect who saw a website’s home page, for example, Google Tag Manager needs to know that the link ends in “/home”.

In a conversion tag, Google Tag Manager can use the information related to the price and name of the product sold.

These variables allow platforms integrated into GTM to obtain more information.

There are “built-in” variables and “user-defined” variables.

Data layer (“temporary storage”):
The data layer is like a temporary file that stores the information that GTM might need.

There are two parts: key and values.

Organization:
Here are Chris Mercer’s top tips for keeping the GTM organized:

  • As with Google Analytics, GTM admins are allowed to delete users. So be careful with this authorization.
  • To know when to create new containers, consider the user journey and not just the domain. Sometimes different domains equal one journey and must be kept in the same container. That’s what happens when a website takes a checkout on an external domain, for example.
  • GTM organizes tags, triggers, and variables alphabetically. So use naming strategically and keep all tags, triggers, and similar variables together.
  • Another good tip is to create folders to organize tags, triggers, and variables that must be together.

Preview mode:
Preview mode is a feature provided by GTM for you to test if your settings are really correct and working.

It is divided into five parts: summary, tags, variables, data layer, and errors.

Note: changes made are not automatically transferred to preview mode. It is necessary to press “Refresh”.

Workflow:
1. Create a workspace;
2. Create the desired tags, triggers, and variables;
3. Use preview mode to test changes;
4. Post with a name and description that helps you identify the changes that have been made.

--

--