How to Redact Email Addresses and Query Parameters in Google Analytics 4

No comments yet

Today, we’re diving into a nifty GA4 feature that helps you redact sensitive data like email addresses and query parameters.

Why Redact Data?

Redacting data is crucial for privacy and compliance reasons. You don’t want to accidentally collect sensitive user info.

Step-by-Step Guide

Head to Admin Area

  1. Go to Admin: Open your GA4 property and head to the Admin area.
  2. Data Streams: Click on ‘Data Streams’ and select your web data stream.

Redact Email Addresses

  1. Redact Data: Scroll down to find the ‘Redact Data’ option.
  2. Enable Radio Button: Simply enable the radio button next to ‘Email Addresses’.

Redact Query Parameters

  1. Check Your Data: Before redacting query parameters, check which ones are actually in your data. Neil recommends creating a free-form report in GA4.
  2. Add Query Parameters: In the ‘Redact Data’ section, you can add up to 30 query parameters. Separate them with commas.

For example:

  • gtm_debug,
  • fbclid
  1. Save: Don’t forget to hit save!

Verify

After a day or two, revisit your free-form reports to make sure the redacted data is no longer appearing.

Popular Query Parameters to Consider

Check out our list of popular query parameters like gtm_debug and fbclid.

Final Thoughts

That’s it! A simple yet effective way to keep your GA4 data clean and compliant. Check back in a day or two to make sure it’s all working as it should.

You can also check out more of our blogs here.

How to Set Up a GA4 Roll-Up Property with Google Tag Manager

No comments yet

Introduction

Tracking user behaviour across multiple websites is crucial for businesses, Google Analytics 4 (GA4) offers a solution through its roll-up property feature. This blog post aims to guide you through the process of setting up a roll-up property in GA4 using Google Tag Manager (GTM). You can either watch the video tutorial below or continue reading for a step-by-step guide.

Creating a GA4 Roll-Up Property

  1. Navigate to GA4: Open your GA4 account and create a new property. This will be your roll-up property.
  2. Name the Property: Give it a descriptive name, such as Roll-up Property, so that users can easily identify it.
  3. Copy Measurement ID: Once the property is set up, go to ‘Data Streams’ and copy the ‘Measurement ID’.

Creating a Duplicate Google Tag in GTM

  1. Open GTM: Go to your Google Tag Manager account and create a new workspace.
  2. Duplicate the Tag: Click the three dots next to the Google Tag and select ‘Duplicate’.
  3. Rename the Tag: Give the duplicated tag a new name to indicate it’s for the roll-up property.
  4. Update Measurement ID: Change the ‘Measurement ID’ in the duplicated tag to the one you copied from your GA4 roll-up property by creating a new variable. If the site only has one environment, you can create a Constant variable and past the Measurement ID into the variable.

Setting Up Cookies

  1. Add Cookie Prefix: In the duplicated tag, add a new parameter called ‘cookie_prefix’.
  2. Set Prefix Value: Assign the value ‘roll-up’ to the ‘cookie_prefix’. This ensures that the cookies for the roll-up property are distinct from your main property.

Duplicating Event Tags in GTM

  1. Find Event Tag: In the same GTM workspace, locate the event tag you want to duplicate.
  2. Duplicate the Tag: Click the three dots next to the event tag and select ‘Duplicate’.
  3. Rename the Tag: Give the event tag a new name to indicate it’s for the roll-up property.
  4. Update Measurement ID: Change the ‘Measurement ID’ to the one you copied from your GA4 roll-up property.

Configuring Cross-Domain Tracking

  1. Go to GA4 Roll-Up Property: Navigate back to your GA4 roll-up property.
  2. Configure Domains: Go to ‘Data Streams’ and click on ‘Configure Domains’. Add all the domains you want to track.

Testing Your Setup: A Deep Dive

GTM Preview Mode

  1. Activate Preview Mode: In GTM, activate the preview mode to test your setup before publishing.
  2. Check Events: Make sure that both the normal and roll-up page view events are firing. You should see these events in the GTM preview pane at the bottom of your website.
GA4 Roll-Up property

Chrome Developer Tools for Cookie Inspection

  1. Open Developer Tools: Right-click anywhere on your website and select ‘Inspect’ to open Chrome Developer Tools.
  2. Navigate to Application Tab: In the Developer Tools, go to the ‘Application’ tab.
  3. Check Cookies: Here, you’ll see a list of cookies. Look for cookies with the ‘roll-up’ prefix to ensure that your cookie prefix setup is working.

Chrome Developer Tools for Event Inspection

  1. Go to Network Tab: Still in Chrome Developer Tools, switch to the ‘Network’ tab.
  2. Refresh the Page: Refresh your website page to trigger the events.
  3. Check Measurement IDs: In the ‘Network’ tab, you should see network requests with different measurement IDs. These IDs should match the ones you’ve set up for your main and roll-up properties.
  4. Inspect Payloads: Click on these network requests to inspect their payloads. You should see ‘page view’ events for both measurement IDs, confirming that events are being sent to both properties.

By following these steps, you’ll ensure that your roll-up property is not just set up correctly but is also capturing data. This comprehensive testing using GTM Preview Mode and Chrome Developer Tools is crucial for confirming that your setup is flawless.

And there you have it! A comprehensive guide to setting up a roll-up property in GA4 using GTM. This allows you to aggregate data from multiple sites into one property, making it easier to analyse user behaviour across platforms.

You can read more of our blogs here.

How to connect Google Analytics 4 to BigQuery

1 comment

Connecting Google Analytics 4 to BigQuery – A Step-by-Step Guide

Google Analytics 4 brings data science to the mass market by allowing you to export data for free to Google BigQuery, Google’s powerful cloud based data warehouse platform. Google Analytics 4 has many innovative features which makes it a valuable complement to Universal Analytics. One of these benefits is the ability to export raw and unsampled data from Google Analytics 4 to BigQuery for free. You can also use a free version of BigQuery, called BigQuery Sandbox.

If your website has a high volume of traffic or you try to analyse data from a long date range, there is a risk of sampling of data in GA4 if you run a non pre-existing standard report. Sampling will occur in GA4 when a non pre-existing report exceeds 10 million events, and it is also prone to sampling when you analyse data over more than 60 days.

If you are not yet using GA4, you can read my step-by-step guide to upgrading to Google Analytics 4 here.

You can view the video or read the blog below.

1. What is BigQuery?

BigQuery is an enterprise multi-cloud data warehouse platform which can process high volumes of data in a few seconds. It allows you to conduct real-time analysis of data and use SQL to process it within a few seconds. Because it’s part of the Google suite of solutions it easily integrates with other Google products like Data Studio and Google Sheets.

The real power of BigQuery comes though comes from integrations with many third-party CRM and other marketing tools. This includes HubSpot, Slack, Facebook Leads, and Salesforce.

2. Why Link Google Analytics 4 to BigQuery?

As with any data warehouse you need a high level of security and BigQuery offers two-factor authentication and gives you secure by design infrastructure from Google.

No sampling of data. Sampling of data is common is many Google Analytics reports when you have a website with high volumes of visitors or you are using time series data. But sampling reduces data reliability because it can distort reporting and lead to misinterpretation of results. BigQuery allows you to export raw data without any sampling and so you can conduct much more granular analysis with confidence.

Affordability. BigQuery allows you to just pay for what data is collected and processed.

  • A scalable solution which can easily and quickly adjust to large volumes of data.
  • Export custom event parameters and dimensions.
  • Connect GA4 data with third-party API’s.
  • Connect data from BigQuery data with popular data visualisation tools such as Data Studio, Power BI and Tableau.

3. How to connect Google Analytics 4 with BigQuery:

New BigQuery customers are often offered free credits to use for the Google Cloud in the first 90 days. Customers also receive 10 GB storage and up to 1 TB for queries per month for free.

4. Create a BigQuery Project:

Go to your BigQuery account here: https://console.cloud.google.com/bigquery?

Click on the drop down menu for ‘My first project’ and then select ‘New Project’.

1. New Project in BigQuery
Source: BigQuery

Now click on ‘Create project’ and a ‘New Project’ screen will open where you can name your project.

2. Select Create Project
Source: BigQuery

Your project name will automatically create a project ID which cannot be changed once it has been set. Click ‘CREATE’ to continue. With your free account you can have up to 25 projects.

3 Create Project in Big Query
Source: BigQuery

You will now see the Notifications screen where you need to click ‘Select Project’.

4. Select Project
Source: BigQuery

Well done, you have now created your Google BigQuery project. You should be able to see your project name at the top of the screen. On the right of the screen you should also see the details of your project, such as the project name and ID.

5. GA4 Project Created in BigQuery
Source: BigQuery

5. Link Google Analytics 4 to Big Query

Now login to your Google Analytics 4 property and navigate to the ‘Admin’ area.

6. Google Analytics 4 Admin
Source: BigQuery

Go to the Product Linking section of the admin console and click on ‘BigQuery Linking’.

7. BigQuery Linking in GA4
Source: BigQuery

Click on the ‘Link’ button and this will open a screen which allows you to select your BigQuery project.

8. Link GA4 to BigQuery

Select the ‘Choose a BigQuery project’ button and this will show you all your existing project.

9 BigQuery Link
Source: BigQuery

Select the project ID that you have already created to send the data from the GA4 property. Then click ‘Confirm’ to continue.

10. Select a BigQuery Project for GA4
Source: BigQuery

Edit the data location for the cloud region where your data is stored. As I am based in the UK I select London. You can then click on the ‘Next’ button.

11. BigQuery Location and Next in GA4
Source: BigQuery

You can now adjust your configure settings. This allows you to edit your data streams if necessary. Select the checkbox to ‘Include advertising identifiers for mobile app streams’ if you are sending data from a mobile app and want to export advertiser identifiers to BigQuery.

12. GA4 advertising identifiers and frequency of data import to BigQuery
Source: BigQuery

Choose the frequency of your data import to BigQuery by selecting by ‘Daily’ and ‘Steaming’ options on the screen. You can now click ‘Next’ to continue.

You should now be able to review your link to a BigQuery project and if you are happy with it you can ‘Submit’ to complete the process.

13. GA4 BigQuery Link Review and Submit
Source: BigQuery

Fantastic, you have now successfully linked your GA4 property to a BigQuery project. This should be confirmed in the screen below.

14. GA4 BigQuery Link Confirmation
Source: BigQuery

6. GA4 Data in BigQuery:

Check that your GA4 project is selected in the top menu. From the left-hand navigation select ‘APIs & Services’ and then ‘Dashboard’.

15. BigQuery APIs
Source: BigQuery

In the dashboard you need to click on ‘+ Enable APIs and Services’.

16. Enable APIs
Source: BigQuery

Here you need to search for ‘BigQuery’ in the search input field. Select the ‘BigQuery API’ as shown below.

Source: BigQuery
17. BigQuery API
Source: BigQuery

You will now see the BigQuery API and click on the ‘Manage’ button.

18. Manage BigQuery API
Source: BigQuery

Here you will also need to select ‘Credentials’ to add a service account for the API.

19. Credentials
Source: BigQuery

Select ‘+ Create Credentials’ and this will open a drop-down menu for you to select a ‘Service account’.

20. Create Credentials in BigQuery
Source: BigQuery

You will now see a screen to set a service account name. Use the account ID and add ‘.gserviceaccount.com’ to the end of it. The service account ID will then be generated automatically. Give you service account a suitable name to reflect the Google Analytics 4 data it will be exporting to BigQuery. You can now click ‘Create’

21. BigQuery Service Account Details
Source: BigQuery

We are now on the ‘Create service account’ screen. Click ‘Done’ to complete setting up your service account to export data from GA4.

22. BigQuery Service Account Done
Source: BigQuery

Congratulations you have now finally created your API account and begin exporting GA4 data to BigQuery. You should also see your service account name under your BigQuery project as shown below. You may have to wait up to 24 hours for the first of your GA4 data to be exported to BigQuery.

23. Login to BigQuery and Select Service Account
Source: BigQuery

7. Access GA4 Tables in BigQuery:

Once you have waited 24 hours you can go back to BigQuery and you should be able to see your GA4 project under pinned projects.

Below your project name, you should see a data set with your GA4 property ID appended to the name as shown here “analytics_property_ID”. The analytics data set contains two tables which hold your Google Analytics 4 data.

  • Events_(number of days)
  • Events_intraday_<current date>
24. Select BigQuery Project
Source: BigQuery

Events Data Table:

Your GA4 data from the previous day will be automatically exported from the property to BigQuery every day. You will notice this as the number appended to the events data set will reflect the number of days imported into BigQuery.

Click on events_(number of days) and this will display the structure of the table schema. Above the table you will see the last date when data was imported. If you click on the date below ‘Events’ you will open a drop down which shows the individual dates you have data for. You can also select an individual date to view the data for that particular date.

25. BigQuery Analytics Project - Events
Source: BigQuery

Select the ‘Details’ tab if you want to see the size of the table, number of rows and when the table was made. If you click on ‘Query’ you can begin to run analysis using SQL.

26. BigQuery Project Details and Query
Source: BigQuery

However, if you select the ‘Preview’ tab you can inspect your data without having to run a query. This is good practice as it allows you to view the data you have imported and check it as you expected for your analysis.

27. BigQuery Analytics Project - Events - Preview
Source: BigQuery

Events Intraday Table:

Data from today will be imported into the events_intraday table. The data is automatically imported throughout the day and this will correspond with the ‘streaming’ frequency setting in Google Analytics 4.

As with the events_(number of days) data table, you have separate tabs for schema, details and preview.

28. BIgQuery events_intraday Table for GA4
Source: BigQuery

8. Conclusion:

BigQuery is a powerful cloud-based data warehouse that can automatically import your raw and unsampled GA4 data into. This avoids distorting your reporting by using unsampled data and allows you to undertake deep analysis of metrics without any limits imposed by GA4. Other benefits of using BigQuery with GA4 data is that it allows you to:

  • Track the whole user journey by freeing yourself of the limits of analysis within the GA4 console.
  • Create reports without any limits on the amount of data or the dimensions you apply.
  • Connect BigQuery with many other third-party solutions such as Snowflake and many other data analysis platforms.
  • BigQuery also integrates with popular data visualisation tools such as Data Studio and Tableau.

Begin the process of taking your GA4 data analysis to the next level by connecting it to Google BigQuery.

Create an Exploration Report in Google Analytics 4

No comments yet

A Step-By-Step Guide to Create an Exploration Report in Google Analytics 4

Google Analytics 4 offers users a powerful suit of insight tools in the form of the Analysis Hub. I have previously covered how to create a funnel report in Google Analytics 4, and this should be one of your go to reports for optimising your site or app. In this post, I will take you through how to create an exploration report in Google Analytics 4.

The exploration report in Google Analytics 4 displays your data in a dynamic table format and provides advanced functionality which is not available in Universal Analytics (UA). This includes the ability to apply multiple custom segments and filters to uncover new insights to help you optimise your digital experience. The exploration report replaces custom reports in the UA version of Google Analytics.

The Analysis Hub in Google Analytics 4 makes it worthwhile upgrading to GA4 and complements what you already get from Universal Analytics. If you want to know more about how GA4 compares to Universal Analytics checkout my post on how to upgrade to Google Analytics 4 with GTM.

1. Create Events for GA4:

Before you can create an exploration report in Google Analytics 4 you will need to configure key events in GA4 and use GTM to set up custom events. You can read my post on how to track events in Google Analytics 4 with Google Tag Manager.

If you want to implement enhanced ecommerce in GA4, then check out Simo’s blog post here.

2. The Analysis Hub:

Go to your GA4 property and go to Analysis > Analysis Hub and click into the Exploration report.

1. The Analysis Hub in GA4

3. Exploration Report in Google Analytics 4:

This will open up the Exploration interface which containers three tabs, Variables, Settings and the output tab. The first two allow you to tailor and configure the exploration report to your specific needs. However, this requires some planning and preparation to ensure you have access to the correct segments, dimensions and metrics for your report.

2. The exploration report in Google Analytics 4

4. Variables:

The variables tab is where you configure the data you want to use in your exploration report in Google Analytics 4. This requires some planning as you can only access dimensions and metrics that are being sent to your GA4 property. This tab covers:

  • Report name
  • Date range
  • Segments
  • Dimensions
  • Metrics

4.1 Report Name:

Give your report name a descriptive title and bear in mind that in the Analysis Hub listing it won’t display the type of report (e.g., funnel or exploration) it is.

3. Variables tab - name

4.2 Date Range:

Set the period you want the report to cover, but consider when you first created your GA4 events, as this may limit the date range you can use. You can use a pre-set date range (e.g., Last week) or set a custom date range and compare data to the previous period.

4. Time period for exploration report

4.3 Segments:

The segments allow you to compare your exploration report results against different cohorts of interest. The default segments may not be relevant and are often incomplete. Delete the segments that you won’t need and create new segments that you are interested in. There are four types:

5. Segments in exploration report in GA4

  1. User segment: Visitors who meet a set criterion. For example, visitors who click on a paid advert in Google (Paid traffic) or are from an individual country.
  2. Session segment: When sessions meet defined criteria. For example, all sessions where users were acquired from a set campaign or are in a set age group.
  3. Event segment: These segments are defined by specific events, such as newsletter sign up, add to cart or purchase.
  4. Suggested segments: These include three types of segments:
  • General segments such as recently active users and non-purchasers.
  • Templates cover such segments demographics (e.g., age or gender), acquisition and technology.
  • Predictive segments allow you to build predictive audiences based on purchasing and churning events. To be eligible to use predictive segments your site or app will need to meet these criteria:

Over a seven-day period at least 1,000 returning users who meet the predictive criteria (i.e., purchase or churn) over the previous 28 days.

Over a seven-day period at least 1,000 users who did not purchase or churn over the previous 28 days.

This must be sustained over a seven-day period, and the eligible data must be sent to the property as the purchase or app_purchase events.

Predictive metrics are then generated for each active user once per day. This data can then be used to build an audience for remarketing to these users via Google Ads.

Once you have decided which segments are important to your digital experience, go about creating these by using the appropriate type. For example, I wanted to compare mobile traffic to desktop users. Here I created the segment for desktop traffic by searching for Device category and selecting contains or equal to ‘desktop’.

6. Desktop traffic segment

4.4 Dimensions:

You will also see a list of default dimensions. Just like with segments, you can create new dimensions by clicking on the ‘+’ button and delete dimensions that are not relevant. Dimensions can be used to create filters to exclude users who can never convert and to breakdown your exploration table for more detailed analysis.

7. Dimensions

You can have up to five dimensions in rows and two in columns for your GA4 exploration report.

4.5 Metrics:

Metrics define the nature of the analysis by transforming your report into actionable data. You may want to add metrics such as transactions, conversions, and user engagement to go along side more generic metrics like active users.

8. Metrics

5. Tab settings:

This column allows you to create your exploration report and configure what it looks like. We are concentrating on the exploration report, but you can change this in the Technique drop-down menu where you can select other reports such as Cohort analysis, path analysis and Funnel Analysis.

5.1 Visualization:

Below the Technique drop-down menu, is the visualization selector where you can choose between:

  • Table
  • Donut chart
  • Line chart
  • Scatterplot
  • Bar chart
  • Geo map

Depending upon which type of visualization you choose, you will have different choices in terms of customisation of the report. I will concentrate on the table here as this gets most use and is where you may begin to identify new insights.

5.2 Line Chart:

However, the line chart is also worth briefly mentioning because this is useful to see if metrics are changing over time as a result of your optimisation activity.

9. Visualization options

The line chart allows you to set different levels of granularity to reflect the volume of data and how frequently you want to measure your key metrics.

10. Line chart granularity

The line graph also has an anomaly detector enabled by default. This allows GA to automatically indicate when something is causing a problem and so can save you valuable time during the analysis process. The training period determines how much data is collected to calculate the expected value. This means the longer the training period the more likely any anomaly will be real and so set the higher value here.

Sensitivity determines the sizes of the anomaly required to trigger the indicator. The higher the setting, the narrower the area of the expected value will be able to signify an anomaly.

11. Line Graph Anonmaly Detection

5.3 Table Visualisation:

Going back to the table visualization, the next setting to consider is the segment Comparison. You can include up to 4 segments in your data table to compare your performance. Double click each segment or click and drag into the Segment Comparison widget.

12. Segment comparison

The exploration report example here has the following configuration:

  • Two segments – purchasers and non-purchasers
  • Browser dimension in the row section
  • Device category in the column section
  • Active user as the chosen metric

5.4 Pivot Table Options:

The exploration reports gives you four pivot table options to choose from. The default option is ‘First column’, which means the segments is shown in the first column. This is what is looks like.

13. Segment in first column in exploration report in Google Analytics 4

The next option is ‘First row’. This means the segment appears first in every row and looks like this:

14. Segments in first row in exploration report in Google Analytics 4

The third option is ‘Last row’. This means the segment is displayed last in every row and it looks like this.

15. Segment in last row in exploration report in Google Analytics 4

Finally, ‘Last column. This means the segment shows after all column dimensions.

16. Segment in last column in exploration report in Google Analytics 4

5.5 Rows:

This is where you select the dimension for the rows in your report. Here I have selected browser for my table, and so each row displays a different browser in the table.

17. Rows in pivot table

You can have multiple dimensions in rows in your report. Here I have added browser version to go alongside browser. You can also decide from which row to start and set a maximum number of rows to display.

18. Two dimensions in pivot table

However, if you want to have more than a single row you may want to toggle to nested so that the second row is grouped according to the first row. Here the second row is the browser version and so all Safari browser versions are shown first before other browsers are displayed.

19. Nested rows

5.6 Columns:

This allows you to add dimensions as columns. Click and drag dimensions into the row section. Here I have added Device category as the column. Again, you can decide from which column to begin displaying data and the maximum number of columns per single dimension.

20. Columns and Start column

5.7 Values:

Simply click and drag the metrics that you want to display in your table into the Values section. You can add up to 10 metrics in a single exploration report. The cell type allows you to choose how to display the metric cell based on its value and the ratio to other rows in the same column. The options here are:

Bar chart – this will display horizontal bar charts in every metric cell.

Plan text – no visual enhancement is shown if this is selected.

Heat map – the colour of cells are darker if their value is higher compared to other rows of the same dimension column.

20. Columns and Start column

5.8 Filters:

This allows you to exclude certain users or events to reduce noise from the analysis. For example, here I use City to exclude users from outside London as the website only delivers within the boundaries of Greater London. You might want to exclude users who are logged in or visitors from certain countries, depending upon what kind of analysis you wish to undertake.

22. Filters

6. The Exploration Report:

Now that you have configured your exploration report in Google Analytics 4, you can now duplicate it to change the type of technique (e.g. make it a line graph) or add a new tab to begin creating a totally new exploration report. You can also download the report into various formats, including Google Sheets and a PDF.

23 Duplicate and add new tab

By default, all your exploration reports are only visible to you. This means that you will need to share the report with other users of the GA4 account if you want other users to be able to access the report. If other users wish to edit the report, including changing the date range, they will have to duplicate the report so that they become the report owner.

6.1 Right-Click:

If you right-click a cell in your report this give you the following options:

  • Include section
  • Exclude section
  • Create segment from selection
  • View users

24. Right click on table cell

Include only selection. This adds an include filter to the table based upon the cell you clicked and so will enable you to narrow down the report accordingly.

Exclude selection. Adds an exclude filter to the table based upon the cell you clicked into.

Create segment selection. This will automatically open the segment creation interface with some conditions prefilled based upon the cell you selected.

View users. This will open an explorer report with users who make up the same selection.

7. Summary:

The exploration report in Google Analytics 4 offers an extensive range of features to deep dive into your data. However, preparation is the key to success. Ensure you have created the events needed for your analysis using the GA4 interface and GTM.

Similarly, consider what segments you want to compare against in your report. If you have the required volume of purchasers you could create predictive segments and use these for remarketing. Next, set up the dimensions you want to breakdown your exploration report by as you will need these to be in the variables tab to add them to your report.

Ensure you also have your metrics defined as you can add up to ten to your exploration report. You can then decide which segments, dimensions and metrics to create your report. Remember to set appropriate filters to reduce noise and narrow your audience as required.

Using Predictive Audiences in Google Analytics 4:

No comments yet

Google Analytics 4 not only offers advanced web analytics, but its predictive audiences can be used to identify which users are most likely to convert or churn. This allows marketers to create more effective campaigns in Google Ads for both remarketing and re-engagement.

GA4 could also allow marketers to make higher bids for keywords if they are triggered by a predictive audience that has a higher propensity to convert. If you haven’t already upgraded to Google Analytics 4 this may be a reason not to delay anymore. Predictive audiences deliver a valuable tool for conversion rate optimisation to help grow the business and improve conversions.

1. What are predictive audiences?

GA4 automatically enriches data using machine-learning to predict the future behaviour of your visitors. GA4 currently has three predictive metrics for building predictive audiences.

Purchase probability: The propensity that a user who has been active in the last 28 days will convert in the next 7 days. This is only for purchase and in_app_purchase.

Churn probability: The propensity that a user who has been active within the last 7 days will not be active in the next 7 days.

Revenue prediction: The estimated revenue from all purchase conversions in the next 28 days from a user who has been active in the past 28 days.

2. Prerequisites:

Given predictive metrics rely on machine-learning, GA4 requires a certain number of conversions to activate these metrics. To successfully train the predictive models, over a 7-day period GA4 needs a minimum of 1,000 returning users who had previously converted (purchases or churned users) in the past 28 days, and also 1,000 non-converters over the same period.

These volumes of conversions must be over a period of time for a GA4 property to be eligible for predictive metrics. If your property meets the criteria, the predictive metrics will be generated for each active user once per day.

3. Create predictive audiences:

To build predictive audiences go to your GA4 property and navigate to ‘Audiences’ and click on ‘New audience’.

1. Audiences in Google Analytics 4

This takes you to the ‘Build a new audience’ interface where you will have the option to create an audience from scratch or use ‘Suggested audiences’. Select the ‘PREDICTIVE’ tab on the Suggested audiences section.

2. Build a new audience for predictive audiences

Depending upon the volumes of data from your GA4 property, you will get an eligible or not eligible to use message below each audience.

3. Predictive Audiences

There are currently 5 suggestions for predictive audiences:

  • Likely 7-day purchases. Users with a high propensity to purchase in the next 7 days.
  • Predicted 28-day top spenders. Users who are generating the most revenue in the next 28 days.
  • Likely 7-day churning users. Active users who are also unlikely to visit your site or app in the next 7-days.

You cannot modify the predictive condition for each audience, but you can add new non-predictive conditions. Such as Device category equals mobile.

4. How to use predictive audiences?

When you create predictive audiences, make sure you use a Google account that has permissions for your Google Ads account. Predictive audiences will then be automatically shared with all Google Ads accounts linked to your GA4 property. Google suggests two ways of using predictive audiences in remarketing campaigns and re-engagement campaigns.

4.1 Remarketing audiences:

Predictive audiences are ideal for remarketing campaigns because GA4 uses machine learning to identify deep patterns of behaviour that are unique to your site or app which indicate the user is likely to convert. The ‘Likely 7-day purchasers’ are the ideal audience for a remarketing campaign. A persuasive follow-up message delivered to these users could also be the trigger they need to complete a purchase.

4.2 Re-engagement campaigns:

Re-engagement campaigns can help maintain engagement with your business among users who are showing waning interest in your products or services. The ‘Likely 7-day churning users’ are a cohort of users who need to be re-engaged and would benefit from a strategic message or special offer to reverse a decline in engagement.

4.3 Strategic bid adjustments:

You could also use predictive audiences that are likely to purchase to trigger keyword bids. This should allow you to place higher bids on keywords because these users will have a higher propensity than normal to purchase.

4.4 New customer campaigns:

Predictive audiences can also grow your customer base. Try using the ‘Likely first-time 7-day purchasers’ audience as a means of attracting new customers across the Google Display Network, Gmail, YouTube and the Search Network.

Conclusion:

Predictive audiences offer marketers an opportunity to improve targeting and conversions in the digital space. Testing of predictive audiences require building up the data to prove their effectiveness. But as the machine learning processes more data it should become more accurate at predicting outcomes.

Featured image by Fancy Crave on Pixabay

How to Create a Funnel Analysis Report in Google Analytics 4

2 comments

The funnel analysis report in Google Analytics 4 is an awesome report which anyone involved in conversion rate optimisation will find invaluable. The report can help you instantly identify areas with the greatest potential for optimisation. It allows you to automate and compare completion rates for each step in a journey by key customer segments and breakdown the report by important dimensions, such as device category. The funnel analysis report is an exponential improvement on existing goal funnel reports provided in Google Analytics 3 (Universal Analytics).

Google Analytics 4 offers you a powerful new funnel visualisation tool that was previously only available in GA360. This allows you to create a funnel visualisation with any kind of event, including impressions, clicks and pageviews. In addition, you can build a funnel analysis report in Google Analytics 4 to include:

  • A comparison of completion rates by up to four customer segments (e.g. mobile, desktop traffic and tablet users),
  • Breakdown each step in your funnel by dimensions (e.g. source of traffic),
  • Elapsed time between each step of the funnel,
  • Identify the next event immediately after each step in the funnel,
  • Set a filter for the funnel to exclude users who could never convert (e.g. use country or region).

This allows you to immediately identify any differences in drop off rates at each step in the funnel for these important dimensions and segments. It also allows you to use filters to exclude traffic which will never convert or to create separate funnels for different markets or geographic locations.

In this blog post, I will show you how to create and fully configure a funnel analysis report in Google Analytics 4. This will ensure you fully benefit from the functionality of the Google Analytics 4 funnel analysis report.

Watch my video of how to plan and create a funnel exploration report or read the instructions below:

1. Planning Events for your Funnel Analysis Report in Google Analytics 4:

Firstly, to create a funnel visualisation in Google Analytics 4 you will have first need to configure GA4 events for each step in the user journey. Check out my post how to track events in GA4 using Google Tag Manager. This explains how to create most of the events you will need, including click and element visibility tags.

GA4 automatically records all pageviews under a single event name. For this reason, you may need to configure events for individual pages before creating your funnel analysis report. This can be done by setting up events in the GA4 interface as explained here.

It is also worth consider which dimensions and segments you will want to analyse your funnel report by. This is one of the most powerful elements of the funnel analysis and will save you from having to undertake custom analysis.

2. Create a New Funnel:

Secondly, in GA4 go to ‘Analysis’ > ‘Analysis hub’ and select ‘Create a new funnel’.

1. Analysis hub - create a new funnel analysis report in Google Analytics 4

3. Funnel Console:

You will be taken to the funnel console which has a Variables, Tab Settings and Exploration tab.

2 Funnel Analysis Report in Google Analytics 4Variables tab: This is where you enter your funnel name, set the time-period, and configure segments and dimensions for use in your GA4 funnel.

Tab Settings: Is where you define the nature of the analysis, including the type of visualisation, segment comparisons and funnel breakdown. It is also where you configure the individual steps in the funnel.

Exploration tab. Here you will see the funnel visualisation and the corresponding data table of each step of the funnel you created. What you see here is determined by your settings in Tab Settings. But you can also create other analysis here using all the features of the Analysis hub.

4. Name Your Funnel:

Choose a short, but descriptive name for your funnel as this is what is displayed when someone goes to the Analysis hub.

3. Set the funnel name

5. Date Range:

Now set a suitable date range and if you have only recently created events in GA4 you may have to use the custom range. This allows you to set a suitable date range based upon when you first started collecting data on the funnel steps.

4 Date Range for Funnel Analysis Report in Google Analytics 4

5. Default Funnel:

You will now be able to see a default funnel which is automatically set up when you first create a funnel in Google Analytics 4.

5 GA4 Default Funnel Steps in GA4

6. Type of Funnel Visualisation:

Google Analytics gives you two types of funnel visualisation to choose from. You can select a standard funnel which gives you a snapshot in time or a trended funnel.

6 Select type of funnel analysis report

The later allows you see how the funnel is changing over time which can be very useful when you make changes to the user journey. We will select the Standard funnel for this example, but you can switch between the two if you so wish.

7 Type of funnel analysis report

 7. Delete Default Funnel Steps:

To create a new funnel Google Analytics 4, you first need to delete the default steps in the console. Remove each of the existing steps until there are no steps remaining.

8 Delete default funnel steps

8. Create First Step in GA4 Funnel:

Select the edit icon and this will open the first step in your funnel. Give the step a short, but descriptive name as this will appear in the funnel visualisation. Click on ‘Add new condition’ and begin typing the event name. Select the event name you wish to use.

9 Edit funnel steps in GA4

You have the option to add a parameter if you need to set conditions based upon events or dimension that are configured in GA4. You can for example set the page path as ‘/’ OR ‘about-us’ to allow users to land on different pages before proceeding to the next step in the funnel. There is also an ‘AND’ condition if you want users to comply with two conditions.

10 Set conditions for funnel step events

On the right-hand side of the console there is a display which shows how many users comply with any conditions you set for your funnel. Click ‘Add step’ to create a second step.

9. Create Second Step in GA Funnel:

Here I want to create a step which records if the site can deliver to the customer once they have entered details of their location. Select the event name by clicking on ‘Add new condition’ and search for the name.

I now need to set a parameter value which indicates the customer’s location is valid. Click ‘ADD PARAMETER’ and search for the parameter’s name which is related to the event being used. In this case it’s ‘delivery_response’.

11 Add parameter for funnel step 2

Now select the parameter condition, which in this case is ‘exactly matches (=)’.

12 Parameter condition

Finally, select the parameter value, which in this case is ‘accept’. This was set by getting a developer to add a data layer push to the site to record if the user’s address was valid for delivery.

13 Parameter value

GA4 allows you to set conditions so that only users who proceed directly from the previous step are shown in your funnel. This often occurs for secure, logged pages which limit navigation options.

14 directly or indirectly followed by setting in GA4

Select ‘is indirectly followed by’ and this will give you the option to choose ‘is directly followed by’ to set this condition in your funnel.

15 indirectly or directly followed by options

You can also set a time limit for the period between a previous step. This may be useful if your site has strict time-out conditions for users to complete certain tasks. This is common for ticket purchases on event sites. Check the box shown below.

16 step within time period

This will allow you to choose the appropriate time-period from seconds, minutes, hours, or days. I would avoid using days because increasingly browsers are deleting cookies after 24 hours and so it is unlikely to be a reliable metric.

17 Time period options

If you forget a step or get the order of events wrong, click on the three dots on the right-hand side of each step. This allows you to copy, remove or add a step (above or below).

18 Copy or add step in GA4

10. Continue with Remaining Steps:

The GA4 analysis funnel allows you to have up to ten steps and so you may need to plan your funnel to ensure you don’t run out of steps. Let’s hope Google increases this as ten steps is quite limiting for many sites.

19 Add further steps and then Apply in GA4

Once you have created your final step in the funnel, remember to ‘Apply’ as this will save your report. If you don’t ‘Apply’ you will lose the steps you have created.

11. Set Dimensions to Refine the Funnel:

Dimensions are useful because they allow you to set filters, next steps or to breakdown your funnel by important categories. The default dimensions in the funnel analysis report are limited and so you will probably need to remove some default dimensions and add more useful ones to the report.

20 Add new dimensions in funnel analysis report GA4

Click on the plus sign and search for relevant dimensions. Here I want to use city because the site only delivers to certain locations in the UK. Select the dimension and click ‘Apply’.

21 Search for dimension in funnel analysis in GA4

Continue with this process until you have added all the dimensions you need for funnel breakdown, next steps, and filters.

12. Create a Filter:

Consider using a filter to remove visitors who could never convert. In this example, I will use ‘City’ because the site won’t deliver to users outside of a certain geographic location. You may want to use country or region depending upon the nature of the site. Click and drag the City dimension into the Filter box.

22 Add filter and select dimension

Select the match type, in this case ‘exactly matches’, and then search for the expression.

23 Select filter condition

Select the expression you are looking for, I’ve chosen ‘London’ for the example here and ‘Apply’. The filter is now set, and it should avoid you including users who have no chance of converting.

24 Select filter expression

13. Open or Closed Funnel:

This tab setting allows you to choose between a closed and open funnel. An open funnel shows users who enter the funnel at any point rather than only following the sequential approach of a closed funnel. A closed funnel won’t include users who join the funnel after the first step, and so may give a false impression of your conversion rate if users can join it on any step. The default setting is closed.

25 Open or closed funnel in GA4

14. Segment Comparisons:

The Funnel analysis allows you to compare up to four segments that are shown in the Segments section of the Variables tab. You can drag and drop or just double click the segments.

26 Segments

You may need to add the relevant segments before you can do this. Click on the ‘+’ to open the Segments interface. You will be presented with a choice between creating a custom segment or using a suggested one.

27 Create a segment in funnel analysis in Google Analytics 4

There are three types of custom segments:

User segment: Where all users meet certain criteria. For example, desktop visitors or users from specific countries.

Session segment: Where all sessions meet set criteria. For example, all sessions where users originated from an individual campaign or visited a certain page.

Event segment: Where you only include certain events. For example, all visitors who have previously made a purchase or added to basket.

In this example, I want to compare mobile users to desktop visitors. As desktop traffic is not a default segment in the Variables Tab it is necessary to create this first. Give the segment a suitable name and add a description.

28 Save and apply segment in funnel analysis report in Google Analytics 4

Search for the condition, select the match type and the expression (desktop). You also have the option to check ‘At any point’ to include users who meet the matching condition at any point in the user journey. Now click ‘Save and Apply’ to add the segment to your funnel.

In the report, each segment is shown as a separate bar chart above the funnel and you can hover over it to display the raw data. Your segments are also shown as the second column in the funnel table and so you will see segment A followed by each parameter for your breakout dimension.

29 How segments display in funnel analysis

15. Breakdown:

This allows you to breakdown your funnel by a single dimension (e.g. Device category). Where the dimension has more than a few possible values you can specify the number of rows per dimension. The default is 5. Click and drag the dimension you want to breakdown the funnel by as shown below.

30 How to apply dimensions for breakdown in funnel analysis report in GA4

16. Elapsed Time:

This displays the average time between each step in the user journey. It’s great for understanding how long it takes users to proceed through a user journey and often highlights how users on different devices behave.

31 How to apply elapsed time in funnel analysis report in Google Analytics 4

17. Next Action:

To see what event occurs immediately after each step in the funnel you can add ‘Event name’ or ‘Screen name’ for apps to the ‘Next Action’ box. Scroll over the bar chart to see the top 5 next events.

32 Next Action in funnel analysis report in GA4

18. Share Your Funnel:

By default, your funnel report is only available to you and so you need to share it with other users of the property if you want other people to be able to view it. Click on the icon shown below and click ‘Share’ to give read only access to other users of the GA4 property.

33 Share funnel with other property users

19. Download the Funnel:

You can download your funnel analysis report in:

  • Google Sheets
  • TSV
  • CSV
  • PDF
  • PDF (all tabs)

34 Download funnel analysis reporting Google Analytics 4

20. Funnel Visualisation:

You should now have a fully configured analysis funnel. This will allow you to instantly investigate each step of the user journey by defined segments and breakdown by individual dimensions. This is a huge improvement on goal funnels you may have used in Universal Analytics.

35 Completed funnel analysis report in GA4

Spend time analysing each step and summarising insights that you identify. The funnel analysis report should save you from having to create many custom reports and time manipulating data to compare completion rates by important segments and dimensions.

21. Replicate Funnel Analysis Report:

You may want to replicate the funnel for different journeys or users with different needs. This can be easily done by coming out of the report and navigating to the Analysis hub. Click on the three dots as shown below and select ‘Duplicate’.

36 Duplicate funnel analysis in GA4

22. Don’t Navigate to Another Property When in a Funnel Report:

When you are in a funnel report, avoid changing to another property. If you navigate directly from the Analysis funnel report to another GA4 property, the funnel report will move to the second GA4 property. This is a bug that may be fixed by Google, but at present it can cause you problems. If this happens to you, navigate directly back to the original GA4 property.

Summary of how to create a funnel Visualisation in Google Analytics 4:

The funnel analysis report in GA4 report is one area without doubt where GA4 outshines Universal Analytics. However, it does require some planning and preparation to optimise your funnel report.

Create events in GTM, and if necessary, configure pageviews for individual pages in the GA4 interface. Consider which segments and dimensions you will need to analysis your funnel by and which might allow you to exclude visitors who could never convert.

Decide what type of funnel you want, either a standard funnel or a trended funnel. Set a time range which relates to when you began collecting your events in GA4.

The funnel analysis report allows you to create up to ten individual steps for a user journey. Remember to use parameters when you need to restrict the nature of the funnel, such as how users respond to a question. Use the indirectly or directly followed settings as needed.

If you have secure pages and strict time-out periods, you can consider setting time limits between steps. Once your steps have been saved, consider setting a filter to exclude users who could not possibly convert on the site.

Decide whether to use a closed or open funnel. If users can join the funnel at almost any step, I would strongly recommend using an open funnel.

Use the dimensions you have configured to apply up to four segments for comparison. Set a single dimension, such as device category to breakdown the funnel.

Enable the ‘Elapsed time’ to display how long it takes users to go from one step to another.

Set the ‘Next Action’ to show the event which occurs immediately after each step in the journey.

Finally, remember to share your funnel analysis with other users of the GA4 property.

How to create events in the Google Analytics 4 Interface

No comments yet

Google Analytics 4, Google’s machine learning powered web analytics platform, is an event-based solution for the modern digital experience. Unlike Universal Analytics, users can create new events in Google Analytics 4 within the new interface. This enables users to create more targeted goals (now called conversions), and to utilise the powerful Analysis Hub. The hub gives you access to new reports and tools, such as the ad-hoc funnels and pathing, which until recently were only available in GA360.

I’ve previously covered how to upgrade to Google Analytics 4 with Google Tag Manager (GTM). In this post I will concentrate on how to create events in the Google Analytics 4 console.

You can watch my video where I show you how to create custom events in the GA4 console or read my instructions below.

1. Goals and Conversions:

To create a conversion (previously called goals) in the Google Analytics 4 console go to ‘All Events’ and enable the relevant event as a conversion. However, because everything in GA4 is an event, including a pageview, this can result in very generic and potentially pointless conversion goals. To prevent this occurring, GA4 allows you to create new events by using the interface.

1. Enable conversions in the GA4 console

2. Create events in Google Analytics 4:

Given that you don’t want every page view on your website to be classed as a conversion, we need to create events which target individual pages that are important to the business. For example, our Contact Us page generates leads which can result in new clients for the business. Let’s create an event for users who go to this page.

2. Create an event in Google Analytics 4 interface

3. Creating an Individual Pageview Event in GA4:

Click ‘Create event’ on the ‘All events’ page (see above) and click ‘Create’ on the next screen. The URL for the contact us page is https://www.conversion-uplift.co.uk/contact-us/ and so we can use this to define the new event.

3. Create events button in GA4

To configure the event, we enter our event name as shown below as ‘Contact_us_visit’ and then the matching conditions. Here we need to set the event_name as equal to page_view. The second condition uses the ‘page_location’ parameter and that needs to contain ‘contact-us’. We can now select ‘Create’ to save the event in GA4.

4 create events in Google Analytics 4

You should now see the new event in the list of custom events.

5. create events in Google Analytics 4

4. Test Event Creation:

To check your event is working as expected I always recommend using GTM preview mode to validate success. Go to GTM and select ‘Preview’ to enable the debug mode. Once you have opened the preview tab remember to select the GA4 container as it’s easy to forget you now have multiple containers if you also have UA running alongside it.

Now navigate to the contact-us page and check the GTM Preview mode tab. You should be able to see the new event in the left-hand navigation and the event displaying as a GA hit event.

6. Test new GA4 event in GTM Preview Mode

By clicking onto the tag, you can view all the hit details captured in GTM. Check this is what you are expecting and go back to the GA 4 interface to see if it is also displaying in the console.

7 GA4 Tag in GTM Preview Mode

In GA 4, select the ‘DebugView’ at the bottom of the left-hand menu list. It can take a while for new events to display in GA4, but hopefully you should see the Contact_us_visit event in the top events in the last 30 minutes.

8. GA4 DebugView

To create more page view events for individual pages simply repeat the process as explained above. This will enable you to use these events when configuring a funnel visualisation in the Analysis Hub.

5. GA4 Click Events:

However, what if not all the events you want to include in your conversion funnel are page view events? Well, this is where GTM comes to the rescue. Many micro-conversions are click events rather than page views. But this is not a problem with GA4 because any type of event can be included in its conversion funnel visualisation.

Let’s use GTM to create a click event tag to send data to GA4. Before proceeding you will need to have created your GA4 Configuration tag in GTM to create a click tag in GTM. Check out my post on creating new events in Google Analytics 4 with Google Tag Manager for full details.

Continuing with the example of my website, the first field of my contact us form is an email text field. I might want to track how many users click into each field to measure any drop-off at each step in the form completion process.

9. Contact Us form fields

Let’s go back to GTM Preview mode and enter an email address in the field on the contact us page. As we can see below the email field has a click ID. This id – ‘wpforms-7058-field_1’ is unique to the email field and so can be used in a GTM trigger for a new tag.

10 Click ID in GTM Preview Mode

Go to GTM > Triggers > New and name your trigger accordingly. Select ‘Click – All Elements’ as this is an input field and select ‘Some Clicks’. We can now specify the condition as ‘Click ID’ > equals > and enter the exact ID we saw in GTM Preview mode.

11. Trigger for Click ID for Email Address

Now go to Tags > New and ensure the name starts with ‘GA4’ so that you can easily distinguish between your UA tags. Configure the tag as follows:

Tag Type: Google Analytics GA4 Event

Configuration Tag: Select your GA4 Config tag

Event Name: email_field

Event Parameters:

If you expand this section, you can send additional parameters to GA to give context to the event. In this instance I want to capture the form_name and GTM already has a built-in variable for this, {{Form Classes}}. You could add other parameters, for example the field name, where you could use the variable {{Click Text}}. The tag should look like the example below.

12. GA4 Tag for email field on contact us form

6. Test GA4 Tag:

Once you have saved the tag it’s worth enabling GTM Preview mode again to test that your new tag is working. Remember to select your GA4 container and you can test the tag by clicking into the relevant field. Once you have completed your testing in GTM you will need to publish the new trigger and tag by clicking the ‘Submit’ button.

13. Test new GA4 custom event in GTM Preview Mode

Your new events should now appear in the GA4 interface within 24 hours, if not sooner. You can then begin tracking them as conversions, but if you want your new parameters to appear in reports you will first need to register them in the GA4 console. Watch this short video on how to register custom parameters in GA4.

14. Enable GA4 event as a conversion

Select ‘Manage Custom Definitions’ and you will be taken to screen showing existing custom dimensions that have been registered. If it’s not already been registered click on ‘Create custom dimensions’.

15. Create custom dimensions in Google Analytics 4 interface

In the next screen you just need to enter the name of your new parameter as it appears in your GTM tag. GA4 automatically creates the custom dimension name below and this will define how it appears in GA4 reports.

16. Register GA4 custom definitions

When you save the new parameter, it should now appear in the list of custom definitions as shown below.

17. Parameter names in GA4 interface

The cool thing about creating custom events in Google Analytics 4 is that you can now use them to create a funnel visualisation in the Analysis Hub. This allows you to combine any kind of event (e.g. click, element visibility and page view) to configure a user journey and display it as an open or closed funnel visualisation. This automatically calculates the drop off rate at each stage in the journey.

18. The Analysis Hub in GA4 - create events in Google Analytics 4

Summary:

GA4 automatically tracks page views once you have set up the GA4 Configuration tag in GTM. However, setting page views as a conversion will not distinguish between different pages and so it’s important to create separate events for individual pages in GA4.

Creating new events for individual pages can be quickly completed by using the GA4 interface. Set matching conditions by using the page path and include useful parameters in the event. Remember to test the new event in GTM Preview mode to be sure it has been configured correctly. You can also test in the GA4 Debug view, but this can take a while for data to come through.

For micro-conversions on a page (i.e. clicks) you can create new events for GA4 in GTM. Use a unique identifier, such as Click ID or Click Text, to create your trigger. This will allow you to configure a GA4 tag in GTM and include parameters if required. Test in GTM Preview mode to validate your tag creation, before publishing your changes in the GTM container. Remember to register your new parameters in the GA4 interface so that they will appear in your reports.

Once you have created and tested all the events in a user journey you can use them in GA4’s Analysis Hub. This is where you can configure open and closed funnel visualisations and undertake path analysis with tree graphs. These are great tools that were previously only available to GA360 users.

How to Track Events in Google Analytics 4 with Google Tag Manager

No comments yet

Tracking events in Google Analytics 4 lies at the heart of Google’s new AI powered web analytics platform. Unlike Universal Analytics, Google Analytics 4 uses an event driven model to identify new insights about web or app users. GA4 automatically measure some types of events, such as clicks on external links, but it many other respects it relies on the user to create and configure events in Google Analytics 4.

GA4 doesn’t have the rigid event structure of Category, Action, Label and value which we associate with Universal Analytics. Instead, events in Google Analytics 4 use parameters so that users can create their own naming conventions. However, this flexibility means the user needs to take greater care with planning and implementing events to ensure consistency and logic with the event structure.

How To Upgrade To Google Analytics 4

Please see my separate blog post if you are considering creating a GA4 property. In the post I explain the differences between GA4 and Universal Analytics and why you should consider upgrading and retaining your Universal Analytics property.

1. Planning Event Creation:

Nothing should change regarding your event planning with tracking events in Google Analytics 4. Event tracking should be driven by your measurement plan which in turn should have been informed by your ecommerce performance framework. It’s important to begin with the customer’s objectives and identify the relevant leading indicators so that you focus on the relevant areas to optimise on your website or app.

In this post we will concentrate on website events and how to implement them via Google Tag Manager. However, many of the principles remain the same for app tracking and website analytics.

2. Structure of Events in Google Analytics 4:

In GA4, all events have a parameter called Event Name and the following parameters are captured by default, including for custom events.

  • language
  • page_location
  • page_referrer
  • page_title
  • screen_resolution

Other than the above parameters, the event parameters used are determined by what you plan and implement. For example, for my website’s contact form we could send the following event name and parameters to GA4:

  • Event Name: contact_us
  • Optimisation_area: web_analytics
  • digital_platform: website
  • industry_sector: financial_services

3. Types of Events:

Events in Google Analytics 4 have four types of events:

  • Automatically measured events
  • Enhanced Measurement events
  • Recommended events
  • Custom events

Before creating any custom event it’s recommended that you first check all the events in the other categories. Only if you can’t find your event in one of the first three types of events should you think of creating a custom event. Let’s look at each of the event types.

4. Automatically collected events in Google Analytics 4:

You can view a comprehensive list of events that GA4 automatically collects here. Most events relate to apps, because GA4 has Firebase as a backend. A number of events are collected once you enable enhanced measurement, but I will cover those in the next section. Events that are automatically collected are:

  • First_visit. The first time a user visits a website (or launches an Android instant app).
  • Session_start. When a user engages an app or website.
  • User_engagement. This has a single parameter (engagement_time_msec) to periodically track engagement time.

5. Enhanced measurement events:

When you first create your GA4 property and configure a web data stream you will be presented with the opportunity to use Enhanced Measurement. This allows you to track additional automatic events once you have added the GA4 configuration tag to the page. To understand how to add the configuration tag go to my blog how to upgrade to Google Analytics 4 with Google Tag Manager.

Enhanced Measurement is enabled by default, but to view it you just need to go to Admin in your GA4 property. Next, select Data Streams < your Web data stream and this will open the window below. I’ve selected ‘+3 more’ to show all the events Enhanced Measurement tracks.

1 Enhanced Measurement events in GA4

  • Page_view – Parameters are page_location (page URL), and page_referrer.
  • Scroll – The first time a user reaches the bottom of each page (90% of vertical depth).
  • Click – outbound clicks
  • View_search_results – Site search. Parameters include search_term.
  • Video_start – When video starts to play. Parameters include video_current_time, video_duration, video_percent and video_url.
  • File_download – For when users click a link leading to a common file extension. Parameters include file_extension, file_name link_classes and link_url.

As enhanced measurement events are tracked automatically, you can’t remove or edit the parameters that come with each event. You can include other parameters to these events by adding them to the configuration tag. Not everyone wants to enable enhanced measurement events, partly because they include the scroll event and I for one like to control when this type of event fires. Click on the data stream setting (2 above) if you need to disable these events.

6. Recommended events:

These are events that Google suggests you consider as standard to set up and configure for your GA4 property. You can access the full list from this Google menu on GA4 events. It begins with generic events for all sectors and then outlines events for individual sectors.

We can expect this list of sectors to grow over time and so keep a look-out for additions in the coming months and years.

Before you create any new Google Analytics 4 events it’s best to check all these lists to see if Google has a recommended event that covers what you want to measure. That’s because Google recommends you implement these events when appropriate. This makes it easier for Google Analytics’ reports to process your data and to identify insights using GA4’s machine learning capabilities.

Google recommends certain parameters for use with these events. For example, for sign up they suggest using a ‘method’ parameter to indicate how users register for your website (e.g. email, sms, Facebook etc).

2 GA4 Recommended events - All sectors

Example of Recommended Event: Sign-up:

If we continue with this example of a recommended event, we would ask a developer to activate a data.layer push script when a user completes registration. This would normally be placed above the GTM script on the sign-up confirmation page. The value of the signupMethod must be replaced dynamically by the function written by the developer so that it reflects the choice selected by the user.

<script>

window.dataLayer = window.dataLayer | | [ ];

window.dataLayer.push ({

‘event’ : ‘sign_up’,

‘signupMethod’ : ‘sms’ // this should be replaced with chosen sign up method

}) ;

</script>

Data Layer Variable:

Once the script has been placed on the confirmation page or it is activated on successful form submission, use GTM Preview mode to test and debug it. You should be able to see the Data Layer event in GTM, but this won’t fire a tag to any Google Analytics property.

To trigger a tag to send data to GA4 we first need to create a Data Layer Variable. Go to your GTM container and select Variables > User defined variable > New

  • Name: DLV – signupMethod
  • Variable Type: Data Layer Variable
  • Data Layer Variable Name: Use the exact same parameter name as you used in the data layer push script (e.g. signupMethod).

3 DLV - signupMethod

Now, let’s go to Trigger > New. We will create a custom event trigger and so configure it as follows:

  • Name: Custom – signup
  • Trigger Type: Custom Event
  • Event name: sign_up (use the recommended event name)

4 Custom Trigger - sign_up

You can now save your trigger so that it is available for your tag.

Before we create a tag for the event, it’s worth checking that you have a GA4 Configuration Tag set up in GTM. This contains your GA4 Measurement ID and may have other configurations you want to use across all your GA4 Tags. This is similar to the GA Settings Variable for Universal Analytics.

Now go to Tags > New and configure it as follows:

  • Name: GA4 Event – Signup
  • Tag Configuration: Google Analytics: GA4 Event

5 GA4 Event Tag - Select GA4 Event

  • Configuration Tag: Select your GA4 Configuration Tag
  • Event Name: sign_up (use the exact same name in the data layer push script)
  • Event Parameters
  • Parameter Name: method (use the name shown in the list of recommended events).
  • Value: {{DLV – signupMethod}} (by searching for the variable you have just created).

6 GA4 Event Tag for sign_up

Now add the new trigger you created for the sign_up event.

You may also want to add custom parameters to your tag. You can include custom parameters in the same tag provided you have included the values of your custom parameters in your data layer push. We will cover custom parameters shortly.

Now save the tag and enable the Preview mode in GTM to test your tag implementation. You can then sign up to your website or newsletter to check the tag is working correctly.

7. Custom Events:

If you have exhausted the list of GA4 events documented by Google, you have the opportunity to create custom events. The process for creating custom events is the same as for other types of events, except you will need to decide upon the event names and parameters.

There is a limit of 500 unique event names for each GA4 property and so you should only create events which are in your measurement plan. Be careful as you can’t delete unused events and Google says it will block any events over this threshold. Although you can collect more than 25 parameters in each tag, GA4 will only allow 25 to be sent to reporting.

Example of Custom Event:

On the homepage of Conversion Uplift there are a number of different call-to-action buttons that I want to measure interactions with. As the homepage is an important landing page it’s appropriate to track clicks on the CTAs and understand the relative value of the different CTAs.

However, before we create any tags it’s necessary to check you have all click variables enabled in GTM. Go to GTM > Varibles > Built-in Variables > Configure and ensure all click variables are checked as shown below.

7 Enable built in variables in GTM

Now we can open GTM Preview mode to interact with the homepage CTAs that we want to track. By clicking on the first CTA we can then select the ‘Link Click’ in GTM to view the data in the ‘Variables’ tab. This allows us to identify the Click Classes and other information captured by GTM which we can use to isolate the clicks we wish to measure.

8 GTM Preview Mode - Variables

In this instance we can see that the ‘Click Classes’ clearly identifies that a button was interacted with. The ‘elementor-button-link’ is the same for all button CTAs on the homepage and we know the click text is different on each button. This means we can use this fragment from the Click Classes to identify the buttons on the homepage.

9 Click classes

Creating A Trigger:

Let’s use this information to create a new trigger in GTM for our homepage CTAs. As it’s a button we want to set up a Link Click trigger and so we can use ‘Just Links’ as the trigger type and ‘Some Link Clicks’. We can use the Click Classes contains ‘elementor-button-link’ to identify a button and Page Path equals ‘/’ because the CTAs are on the homepage.

This ensures the tag will only fire when these conditions are met. If you are looking for a tag to fire on all buttons site wide which contain the same ‘Click Classes’ variable text you don’t need a Page Path rule.

10 CTA Click Trigger

Now go to Tags > New and give your tag a name with the prefix ‘GA4’ so that it is easily distinguishable from your Universal Analytics tags. I would also create an appropriate folder for your GA4 tags.

Now Configure It As follows:

  • Tag Type: Google Analytics: GA4 Event
  • Configuration Tag: Select your GA4 Config Tag
  • Event Name: HP_CTA_Click – use a descriptive name
  • Event Parameters:
  • Parameter Name: hp_cta_link_url
  • Parameter Value: click on the Insert Variable button and select {{Click URL}}
  • Second Parameter Name: hp_cta_name
  • Second Parameter Value: click on the insert variable button and select {{Click Text}}

You can send up to 25 custom parameters for each event. Make sure the names are descriptive as you don’t want any confusion about what they are measuring. You can now add the new just links trigger to the tag and save it. You can’t use the prefix google_,ga_ or firebase_ when you name your parameters as these would obviously conflict with existing GA4 parameters.

11 GA4 Tag for Custom Event

Before you publish the changes make sure you test that the tag is firing correctly. Enable your GTM Preview mode and click on each CTA to check it fires the new tag. We can see below that a Link Click fires the GA4 – Event – HP CTAs tag as expected.

12 GTM Preview Mode GA4 Custom Event Tag

Register Custom Definitions:

To use any event parameter in standard reports, Funnel reports, Exploration etc you must first register these in the GA4 user interface. Go to your GA4 property and ‘Events’ and select the ‘Manage Custom Definitions’ CTA.

13 GA4 Manage Custom Definitions

You should then click ‘Create Custom Dimensions’ and this will open the ‘Custom Definitions > Dimensions’ screen. Enter your event parameter name as defined in your tag and save it. This will ensure your custom parameter is available in your GA4 reports. The name in reports is shown below the input box under “Custom dimension name”.

14 GA4 Custom Definitions Dimensions

8. Create Events in the GA4 Console:

Goals are conversions in GA4, and these include pageviews. However, all pageviews are lumped together as a single category of event in GA4. This is not much use if you want to set an individual pageview as a conversion. For this reason, GA4 allows you to create events for individual pages in the interface. Go to my blog post on how to create events in the Google Analytics 4 interface for more details.

Summary of GA4 Events:

Google Analytics 4 is all about events because it doesn’t measure anything else. However, it’s not a finished product and so it will continue to evolve over time. This means it’s a great time to begin learning about GA4 and how to create events because it is the future for Google’s web analytics.

Remember to use your measurement plan to drive event creation in GA4 as you should have a clear strategy to improve insights from your web analytics. You should first check the events in each of these categories before considering creating a custom event.

  • Automatic events
  • Enhanced events
  • Recommended events

Only once you have exhausted the events covered by these categories of events should you create your custom events. This is to ensure you utilise the benefits of setting up events that GA4 is already configured to understand. You should also use the GA4 interface to create events for individual pages on your site so that you can create funnels and conduct other analysis which is related to site navigation.

However, I would only create those recommended events that are consistent with your measurement plan and are relevant to your business model. Custom events allow you to tailor event tracking to your business and so I would concentrate on using them to improve insights rather than setting up unnecessary recommended events.

How To Upgrade to GA4 with Google Tag Manager

1 comment

Google Analytics 4 is the innovative next generation web analytics platform from Google. GA4 has been created using the power of machine learning to automatically alert you to new trends in user behaviour. In addition, the old interface of ‘Audience’, ‘Acquisition’, ‘Behaviour’, and ‘Conversion’ is now ‘Life Cycle’, ‘Explore’, ‘User’ and ‘Advertising’.

What’s Different about Google Analytics 4?

Google Analytics is an event driven model which you may have seen in Firebase. That’s because it has Firebase on the backend. An event driven model gives GA4 much greater flexibility than UA which is based on pageviews and sessions.

With UA you need to manually configure events. Unless you actively create tags you would have no visibility of what users do on your website, other than the pages they visited. GA4 automatically measures certain types of events and has other types of events that you can easily enable, or you can configure.

Google Analytics 4 Events:

  • Automatically Collected Events – Basic user interactions tracked on your site.
  • Enhanced Measurement – When you enable enhanced measurement the platform will automatically track interactions. Such as link clinks, scrolling, and YouTube video plays.
  • Recommended Events – These events need to be implemented manually but use predefined names and parameters. These are in individual sectors such as Retail/eCommerce and Jobs/Education/Real Estate and Games.
  • Custom Events – As with Universal Analytics you can create your own custom events.

Google documents more details of these differences between GA4 and Universal Analytics here.

Other Features:

  • GA4 has a more flexible data model. You are no longer restricted to the event structure of category, action and label. Instead, GA4 uses parameters to allow you to create your own naming conventions. You need to plan your events in advance to provide consistency and logic to your event structure.
  • Machine learning enables modelling which can extrapolate from incomplete data sets to power a new AI Insights feature. This automatically seeks out useful insights to inform marketers about users on the website or app.
  • Predictive audiences allow you to create remarketing and re-engagement campaigns based upon the probability of users to purchase or churn. This is based upon the machine learning engine in GA4.
  • It is designed for a cross-platform world so that you can stream data from apps and websites into the same GA property.

More features:

  • GA4 integrates directly with BigQuery. Previously this was only available with GA 360, but now it’s free.
  • The Explore section offers new reports such as funnel analysis visualisation and path analysis that were previously only available in GA 360. The funnel analysis report is especially powerful. Unlike GA goals you can define each step of a funnel using any kind of event rather than a one page URL. It also automatically calculates the completion, and abandonment rate for each step in a funnel.
  • All GA4 events are hit-scoped and session scope is no longer available for events, parameters or user properties. Session count may be lower because it is derived from the session_start event which will create differences in how sessions are measured.
  • The default data retention period is just 2 months for GA4, and the maximum is 14 months (50 months for GA4360 users).

What it Doesn’t Have?

  • Views – you won’t find any views in GA4. You won’t have the ability to automatically focus on an individual device, hostname, subdirectory or other user segments.
  • Number of predefined reports. Universal Analytics has a larger number of pre-configured reports whilst GA4 has much greater flexibility in creating custom reports and it offers the ability to analyse data in BigQuery.

1. Upgrade to Google Analytics 4 in ‘Admin’ area of Universal Analytics:

Firstly, I am assuming you already have a Google Analytics Universal Analytics account and have migrated to Google Tag Manager for managing your tags. If not, I strongly recommend you set up those first. To upgrade go to your existing Google Analytics property and then go to the ‘Admin’ are and in the ‘Property’ column click ‘Upgrade to GA4’.

1.Begin GA4 upgrade in GA4

2. Connect Your Google Analytics 4 Property:

Secondly, the next page explains that your existing Universal Analytics property will remain unchanged. Click on ‘Get Started’.

2 Create a new Google Analytics 4 property

3. Create a new Google Analytics 4 Property:

Now you will see the wizard for setting up GA4. However, because we are using GTM to implement GA4 the option to enable data collection using existing tags is not available. Click ‘Create property’.

3. Create a Google Analytics 4 Property

4. Setup Assistant:

This is a list of settings and features you may need to configure to get the most out of GA4. Click on ‘Tag installation’ to enable you to set up GA4 using GTM.

4 Setup Assistant for Google Analytics 4

5. Add Data Stream:

Now choose the data stream which was automatically created when you upgraded. Don’t click on ‘Add stream’ as this will just duplicate the stream you have already created.

5. Select GA4 Data Stream

6. Web Stream Details:

In the top right-hand corner of the page you will see the Measurement ID. Use the copy icon to add this to your Tag Plan as you will need this for creating tags in GTM. Now go to your GTM container and we’ll set up a pageview tag.

6. Data Stream GA4 Measurement ID

7. Configuration Tag:

If you are using GTM you will need to create a GA4 Configuration Tag to send data to your new property.

Sign into the appropriate GTM container and go to:

  1. Tags
  2. New
  3. Name: GA4 – Config (paste your Measurement ID)
  4. Create a new folder “GA4” and save it into this new folder
  5. GA4 Configuration
  6. Trigger: All Pages
  7. Measurement ID: Past the ID you have just copied
  8. Save

"7

8. GTM Preview Mode:

Before publishing the new tag enable GTM Preview mode (Google Tag Assistant) to test that the new GA4 tag is working correctly. To learn about how to use Google Preview and Debug mode check out my post.

8. Enable GTM Preview Mode

Go to the Google Tag Assistant tab and you should see the GA4 container and the new GA4 pageview tag has fired.

9. Google Tag Assistant tab

9. Check GA4 Realtime Report:

It’s good practice to also check data is being sent to the GA4 Property by going to view the Real-time report. It may take a few minutes though for the report to begin displaying data. This appears to be more problematic with properties that have just been made. If all goes well, you should see your hits in the real-time report as you navigate your site or app.

10. GA4 Real-time report

10. Publish GA4 Pageview Tag in GTM:

You can now publish the tag in GTM and begin collecting data from users. Ensure you give it an appropriate version name and description as this also helps GTM users quickly identify the changes made for an individual version.

11. Publish GA4 Pageview Tag

11. Exclude Internal Traffic:

If you would also like to exclude internal traffic in GA4 go to:

  1. Admin
  2. Data streams
  3. Select the stream you want to exclude internal traffic from
  4. Additional Settings
  5. Tagging Settings
  6. Define internal traffic
  7. Create

12 Additional Settings in GA4 to exclude internal traffic

This will take you to the screen to create a new internal traffic rule. Enter the name for the rule, the default traffic type is ‘Internal’, select the IP address operation (e.g. IP address equals) and then paste your IP address into the field. Finally, click ‘Create’ in the top right-hand corner.

13 Create internal traffic rule

12. Data Retention Length:

The default data retention period in GA4 is also just 2 months. It is worth adjusting this to the maximum of 14 months. In ‘Admin’ go to:

  1. Data Settings
  2. Data Retention
  3. Event data retention – select 14 months from the drop down
  4. Save

14 Setting data retention period in GA4

Now you have the basic set up for GA4 you can begin to plan setting up events. However, that’s another blog in its own right and you can check out my blog on how to track events in GA4 using Google Tag Manager if you want to begin creating events. Moreover, Simo has also produced a quality blog post on GA4 events which I highly recommend you read. This is an implementation guide for events in Google Analytics 4 and will give you a comprehensive understanding of GA4 events.

The Google Analytics 4 console also allows you to create some events within GA4. It is a change from Universal Analytics where you either had to get a developer to hard-code events or use GTM. See my post how to create events in the GA4 interface for more details.

Final words on Google Analytics 4:

Finally, Google Analytics 4 complements what Universal Analytics offers and has some great innovative new features, including the use of AI to model incomplete data sets. The event-based approach of GA4 gives GA4 greater flexibility than Universal Analytics (UA). This also means there is more work needed to create the number of reports that come ready built with UA.

In addition, there are gaps with GA4 which limits its capabilities and means that it can’t replicate many of the reports you may rely on from UA. As a result, it is likely that GA4 is not yet ready to meet all your web analytics needs. That’s why most experts believe it is best to run GA4 alongside UA until GA4 becomes a more mature and comprehensive platform.

That’s not to say you shouldn’t upgrade to GA4. Google have clearly stated that all future developments in web analytics will focus on GA4. That’s why it’s a good time to get on board with GA4. Begin learning about how to utilise and build on what this new platform offers. Google appear to be making frequent improvements to GA4 and so it will be much easier to keep abreast of these changes if you are already experimenting with the solution.