Overview
This article will help you set up a basic funnel for tracking users' flow with Google Tag Manager and Google Analytics 4.
Creating the Triggers and Tags on Google Tag Manager
To create a basic funnel, we use pageviews and clicks as the triggers for the Events on GA4. Each page view has a different trigger, depending on the step we're tracking. For this example, we'll be using the following steps:
-
Discovery Overview (pageview).
-
Discovery Details (click).
-
Planner (pageview).
-
Checkout (pageview).
-
Purchased (pageview).
This is for basic funnel tracking, so it doesn't account for in-between steps and multiple steps, like the multiple pages of Checkout or hotels/activities pages.
We'll explain how to set up one pageview trigger and tag and one-click trigger and Tag. You can then repeat the process for the others but with different naming.
Pageviews Setup
Pageviews setup for Discovery Overview, Planner, Checkout and Purchase.
1. On your GTM, start by going to Workspace → Variables → Configure.
2. Check if you have the needed Variables for this setup (all Pages and Clicks Variables):
3. Now, go to Triggers on the menu on the left side of the page.
4. Click New.
5. Click on the white box Trigger Configuration, and select Page View as the Trigger:
6. Update the fields as shown below:
7. Select Some Page Views.
8. Select Page Path.
9. Select the action that's going to execute this Trigger:
- For Discovery Overview, it'll be: contains > /travel/routes
- For Planner, it'll be: matches regEx (ignorecase) > /itineraries/(.*)/modules
- For Checkout, it'll be: matches regEx (ignorecase) > checkouts/(.*)/traveler-details
-
Don’t use just /checkouts/ because it'll fire a begin checkout event on all pages of the booking and will alter your data.
-
To avoid that, we use the first step of Checkout (traveller details) to send an event to begin checkout.
- Hint: You can create steps for all the checkout pages, just replacing the last part of the URL for the one you want to track and create tags for those triggers.
-
For Purchase, it'll be: /confirmation.
-
Lastly, name your three triggers differently so that you can remember them later on.
- For example, trigger_funel_1 (2, 3, 4, 5).
Now, create the Tags that will push this information to Google Analytics 4, when they are raised by the triggers we created before.
- On your GTM, click on Tags and then New:
- First, associate the Trigger we created with this Tag.
- Click on Triggering:
- Choose one of the Triggers you created:
- Now, click on the top Tag configuration, and select Google Analytics: GA4 Event:
Next, fill in the fields with the information:
-
Configuration Tag
-
Select your configuration Tag that is sending data to GA4 (for example, ours is “GA4 Configuration”).
-
-
Event Name
-
Give a name (that'll show on GA4) to your Event. Try to use recommended events from Google whenever possible ([GA4] Recommended events - Analytics Help). Using E-commerce-specific Events allows you to use this for custom reports.
-
For Discovery Overview: view_item_list, the user sees a list of items available.
-
For Planner: select_item, the user selected an item.
-
For Checkout: begin_checkout (the event begin_checkout is already collected by Enhanced Measurement by GA4, but configure it anyways).
-
For Purchase: purchase (the event purchase is already collected by Enhanced Measurement by GA4, but configure it anyways).
-
-
On the top left corner, give a name to this Tag (that will serve to identify it later on GTM).
-
Click Save.
-
Clicks Setup
Click setup for Discovery Details.
Since the detailed views of Tours don't have a common difference in the URL between them and the list of available tours (Discovery Overview), we'll need to use Click as a trigger. For that, we need to find a difference between clicking on the Tour and all the possible clicks.
Please note: We're working on a more definitive solution to track this event: when a user moves from Discovery Overview to Discovery Details. In IBE-enabled customers, the current setup we describe below misfires this tag, sending partially wrong information to GA4. |
- On your GTM, go to Triggers on the left menu and click New.
- Click on the white box, and select Just Links as the Trigger:
- Update the fields as it’s shown here:
-
Select Some Link Clicks.
-
Select Click ID -> Contains -> ember.
- Click on the + sign.
-
Select Page Path -> Contains -> /travel/routes.
-
Give it a name, and hit Save.
Let’s create the Tag that will push this information to Google Analytics 4.
- On your GTM, click on Tags and then New:
First, let’s associate the Trigger we created with this Tag. Click on Triggering:
Choose the Trigger you created:
Now, click on the top Tag configuration, and select Google Analytics: GA4 Event.
Fill in the fields with the information:
-
Configuration Tag
-
Select your configuration Tag that is sending data to GA4 (for example, ours is “GA4 Configuration”).
-
-
Event Name
-
Give a name (that will show on GA4) to your Event. Try to use recommended events from Google whenever possible ([GA4] Recommended events - Analytics Help). Using E-commerce-specific Events allows you to use this for custom reports.
-
For this case, we will be using the recommended Event: view_item.
-
-
On the top left corner, give a name to this Tag (that will serve to identify it later on GTM).
-
Click Save.
-
Testing and Debugging
Testing and debugging are performed after each Tag is created.
Now, see if everything we set up is working as supposed.
- On the top right corner of GTM, click Preview and enter the link to your instance.
- Click on Connect.
Please note: Repeat this process, creating the new tags, triggers, and names as required. Test each one individually until you have set up all the Events of the Funnel. |
Check your Events on GA4
In GA4, go to Admin > Events.
You have all the Events your GA4 property is tracking in this list. The ones you created in these steps might take up to 72 hours to show as Events on this page.
They will show immediately on debugging view and on your real-time reports. However, you must wait until they appear in the list of Events to use them on the Explore page and create your Funnel.
Create your Funnel
When the Events you created show up on the list of Events in GA4, you can create your Funnel Report:
On the left menu of Google Analytics 4, go to Explore and click on Blank or Funnel, to create a new report:
On the Report, you have three main fields:
-
Variables, on the left.
-
Settings tab in the middle.
-
In the report view, the data you select appears on Variables and Settings.
For this Funnel, we don’t need to add Dimensions, Segments or Metrics. However, if you want to segment your results, further configuration is required in the tab Settings:
-
On Technique, select Funnel Exploration.
-
On Visualization, select Standard Funnel.
-
Turn off Make Open Funnel.
-
On Steps, click on the pencil to create the steps of the Funnel, and on the First Step, click on Add New:
The first step defines how many users enter the Funnel. Example: If a user enters your website and goes directly to the Planner (select_item), this user won't account in this Funnel. Since it didn’t enter the Funnel with view_item_list, it won't account for this user. To see this, you can:
|
After creating your first step, click on Add Step and add the steps of the Funnel in an ordered way:
-
Discovery Overview (view_item_list).
-
Discovery Details (view_item).
-
Planner (select_item).
-
Checkout (begin_checkout).
-
Purchased (purchase).
Now, you can see your Funnel of e-commerce and see where are the bigger abandonment rate and other metrics.
Comments
0 comments
Article is closed for comments.