SaaS Growth Advisory | We Help You With Your SaaS Growth

Conversion tracking in GA4 - How to use Google Tag Manager to log conversion events in GA4

Conversion tracking in GA4 – How to use Google Tag Manager to log conversion events in GA4

Conversion tracking in GA4 functions as an event-driven analytics tool, where every action such as purchases and page views is considered an event. In order to set up conversions in Google Tag Manager, the initial step involves configuring event tracking within Google Analytics. It also becomes necessary to inform GA4 about the relative significance of certain events over others.

A conversion denotes a vital interaction that you aim for your visitors/users to successfully carry out. By actively tracking these conversions, you gain valuable insights into the effectiveness of your acquisition strategies. This analysis allows you to discern which customer acquisition channel is effective and what needs improvement.

If you have experience with the previous iteration of GA4, Universal Analytics, you will recognize that “Conversions” correspond to “Google Analytics Goals.” In Google Analytics 4, these goals can be established using events/parameters, session duration, or the count of page/screen views per session. Here, you can have certain events as conversions. In this blog, we will demonstrate the process of tracking your conversions utilizing Google Analytics 4.

How is GA4 different from Universal Analytics?

Google Analytics 4 provides a more holistic approach, using artificial intelligence and machine learning to deliver more knowledge of consumer behaviour across various platforms and devices. However, Universal Analytics concentrated on recording single visitor engagements on a website. Let’s look at some of the significant distinctions between UA and GA4.

1. Distinct Measurement Models –

The primary distinction between UA and Google Analytics 4 is the measuring methodology that they employ.

Universal Analytics employs a session and page view-based measuring approach. A session is a collection of visitor engagements (hits) with a site that occur over a specific time period. Several page views, actions, and eCommerce purchases can occur throughout the same session.

Google Analytics 4, on the other hand, employs a measuring methodology that relies on parameters & events. The idea is that any engagement can be recorded as an event. This is why all UA hit types are converted to GA4 events. What might be perplexing is that with Universal Analytics an event has its own hit type, category, activity, and label. These classifications are not present in GA4. Each hit is an event, & events can (but are not required to) include custom parameters.

2. Website and App Data Tracking –

The ability to monitor webpage and app data within the same property is one of the most awaited Google Analytics 4 features that were not accessible in UA. GA4 uses the same measurement paradigm as Google Analytics Firebase (which is used for mobile apps), in which all interactions are recorded as events. This new uniform data format between a webpage & a mobile app implies that combining data across them will be considerably easier.

3. GA4 session calculations vs. universal analytics

Another distinction between UA and GA4 that may be seen when comparing numbers between the two platforms is different session values.

A session in UA reflects the duration for which a customer is actively engaged in your site. On the other hand, in GA4 the ‘session start’ event produces a session ID to which every future event throughout the session is connected.

In both UA and GA4, a session stops upon 30 minutes of inactivity. However, unlike Universal Analytics, sessions in Google Analytics 4 may now continue past midnight and are not impacted by meeting new campaign settings.

4. Free BigQuery Connectivity –

BigQuery allows for the rapid querying of very large and complicated data collections. Due to sampling, creating complicated segments in GA causes a slew of issues while evaluating data. Big Query extracts data from GA and allows you to explore it without the need for sampling.

BigQuery exports are now accessible to all properties with Google Analytics 4 (for UA, this was available only for Analytics 360 properties). This means you can transmit raw events to BigQuery, which will subsequently be evaluated using SQL.

5. Google Tag Manager has become more vital than ever –

You could utilise Universal Analytics without Google Tag Manager if you were using simpler features. You could, for example, construct destination page conversions directly in UA.

It’s no longer feasible with Google Analytics 4. Because all objectives are event-based, knowing  Google Tag Manager is more essential than ever.   Knowing and working with GTM is also useful for complex data collection, such as developing customized events and dimensions.

List of automatically collected events in Google Analytics 4

With Google Analytics, you have the capability to monitor both automatically collected events & custom events. Custom events can be further categorized as recommended events and events defined by the user.

Automatically collected events can be classified into two types: those that GA4 automatically gathers after implementing the code on your website, which cannot be disabled, and those that can be toggled on and off using the Enhanced Measurement interface within Google Analytics 4. Enhanced Measurement events are also automatically activated as soon as you establish a GA4 property.

In this section, we will enumerate some of the most important events that Google Analytics automatically tracks upon adding a GA4 snippet code to your website or app.

Event TriggerParameters
1. first_visitWhen a user visits a website or initiates an Android instant app with Analytics enabled for the first time.a. language,

b. page_location,

c. page_referrer,

d. page_title,

e. screen_resolution
2. session_start Upon a user’s interaction with the app or website, an automatic generation of a session ID & session number takes place for each session. These identifiers are then linked to every event that occurs within the respective session.a. language,

b. page_location,

c. page_referrer,

d. page_title,

e. screen_resolution
3. user_engagement When the app remains actively displayed in the foreground or when the webpage is in focus for a minimum of one second.a. engagement_time_msec
4. clickEvery time a user clicks on a link that directs them away from the current domain, outbound click events are generated. By default, these events are triggered for all links that lead outside the current domain. However, it’s important to note that links to domains that have been configured for cross-domain measurement will not activate outbound click events.a.

b. link_domain,

c. link_id,

d. link_url,

e. outbound (boolean)
5. form_startWhen a user initiates an interaction with a form during a session for the first time.a. form_id,

b. form_name,

c. form_destination
6. form_submitUpon the user submitting a form.a. form_id,

b. form_name,

c. form_destination

d. form_submit_text
7. page_viewWhenever the page loads or the browser history state is modified by the active site.a. page_location (page URL),

b. page_referrer (previous page URL),

c. engagement_time_msec
8. scrollWhen the user reaches the bottom of each page for the first time, specifically when 90% of the vertical depth becomes visible.a. engagement_time_msec
9. video_startWhen the initiation of video playback for embedded YouTube videos that have enabled JS API support.a. video_current_time,

b. video_duration,

c. video_percent,

d. video_provider,

e. video_title,

f. video_url, visible (boolean)
10. video_progressWhenever the video surpasses the time thresholds of 10%, 25%, 50%, & 75% of its total duration, this event is triggered. This measurement applies specifically to embedded YouTube videos with enabled JS API support.a. video_current_time,

b. video_duration,

c. video_percent,

d. video_provider,

e. video_title,

f. video_url,

g. visible (boolean)
11. video_completeAt the conclusion of playback for embedded YouTube videos that have JS API support enabled.a. video_current_time,

b. video_duration,

c. video_percent,

d. video_provider,

e. video_title, video_url,

f. visible (boolean)
12. ad_clickTriggers upon a user’s interaction with an advertisement for the publisher’s upcoming events.a. ad_event_id
13. ad_impressionWhen a user is presented with an ad impression featuring upcoming events by the publisher.a. ad_event_id, value
14. app_exceptionIn the event of an app crash or an exception being thrown, this specific event is transmitted when you integrate Firebase Crashlytics.a. fatal, timestamp,

b. engagement_time_msec
15. first_openWhen a user installs or reinstalls an app and subsequently launches it for the first time, this event occurs. It is important to note that this event is not activated upon app download, but rather upon the user’s initial usage of the app.a. previous_gmp_app_id,

b. updated_with_analytics,

c. previous_first_open_count,

d. system_app,

e. system_app_update,

f. deferred_analytics_collection,

g. reset_analytics_cause,

h. engagement_time_msec
16. screen_viewWhenever there is a transition between screens and any of the following conditions are satisfied:

a. No previous screen was set.
b. The new screen name is different from the previous screen name.
c. The new screen class name is different from the previous screen class name.
d. The new screen ID is different from the previous screen ID.
a. firebase_screen,

b. firebase_screen_class,

c. firebase_screen_id,

d. firebase_previous_screen,

e. firebase_previous_class,

f. firebase_previous_id,

g. engagement_time_msec

How to collect form fills as a conversion event using Google Tag Manager?

To begin with, let’s explore the form listener feature provided by GTM (Google Tag Manager).

Step 1 – Access your Google Tag Manager account and navigate to the list of Variables. By default, form variables are deactivated, so you will need to enable them. Locate the built-in variables section, click on “Configure,” and proceed to enable all the Form variables in the right sidebar (remember that any modifications made are automatically saved).

How to collect form fills as a conversion event?

Step 2 – Next, access the list of triggers by selecting “Triggers” from the left sidebar within the GTM interface. From there, proceed to create a new trigger.

When creating a new trigger in the dialogue box, you will come across a checkbox labelled “Check validation“. By selecting this checkbox, Google Tag Manager ensures that the trigger remains inactive if the default form action (submit and redirect) is blocked. On the other hand, if the checkbox is left unchecked, the trigger will be activated whenever a submit event occurs, even if the form submission contains errors such as leaving multiple required fields blank.

Enabling the checkbox leads to the appearance of an additional field labelled “Enable this trigger when all of these conditions are true”. In this field, you are required to input the desired Page path, which refers to an element present in the URLs of the pages where you want to activate this trigger. You can specify whether the trigger should be activated for “All Forms” or “Some Forms”. If you choose to target specific forms, you can enter the condition to exclusively target the desired form, such as the form ID (which you will get from the form submit event of each form that you create) of the specific form for which you want to activate this trigger.

Creating Triggers in Google Tag Manager for Form Submission

Now, save this trigger.

Step 3 – If your website or application includes multiple forms that can be submitted by visitors or users, it can be beneficial to incorporate an additional parameter in your GA4 event tag. This parameter will help you differentiate which specific form was submitted.

In GTM, navigate to the Tags section and proceed to edit the GA4 event tag that you have previously created. There is no strict requirement for the naming of this parameter, but it would be advisable to name it based on the condition you selected to exclusively target a specific form. For instance, if you chose the condition to be the Form ID (as mentioned in Step 2), you can name this parameter as “form_id.” The value of this parameter should correspond to the value of the {{Form ID}} variable.

Then save this Tag too.

Tag configuration for creating forms

Step 4 – Now, let’s utilize GTM’s Preview and Debug mode to determine if the default form auto-event listener is functioning as expected. In your Google Tag Manager account, click on “Preview” located at the top-right corner.

How to collect form fills as a conversion event?

This action will open a new browser tab, prompting you to enter the URL of the page containing the form. Enter the URL and click on “Start.”

How to collect form fills as a conversion event?

Once you have started this process, a new tab or window will open, displaying your website. At the bottom of the screen, you should be able to verify whether the Debug feature is successfully connected or not.

How to collect form fills as a conversion event?

Step 5 – Once the Preview and Debug mode is activated, proceed to the website where the form is situated. Complete the form by filling in all the required fields, ensuring none are left blank.

If the Form Submit event is visible in the Preview and Debug console, it is recommended to conduct another test. Leave at least one required form field empty and submit the form again. This will simulate an error in the form. If the Form Submit event triggers only the first time and not the second time, it indicates that GTM will only track form submissions that have been successfully completed, which aligns perfectly with your requirements.

How to collect a thank you page visit as a conversion event?

You can also use GTM to listen to page views and fire GA4 events based on that. If the built-in form listener in Google Tag Manager is functioning properly, it is important to verify whether the form redirects users to another page upon successful submission. If the form does redirect, you should then examine whether the URL of the redirected page is unique or not. Additionally, consider whether users can access that page without actually submitting the form. If the answer to this question is negative, you can proceed to create a pageview trigger that exclusively activates on the success page. The objective here is to minimize accidental visits to the success page (also known as the “Thank you” page) to the greatest extent possible.

Let’s now proceed with creating a trigger that specifically activates on the “Thank You” page.

1st Step – Navigate to the Triggers section in Google Tag Manager and click on the “New” button.

2nd Step – Choose the trigger type as Pageview & select Some page views.

3rd Step – If visitors are redirected to, you can set one of the following rules for this trigger:

a. Page Path equals /thank-you.

b. Alternatively, you can set the rule as Page URL contains /thank-you. It is recommended to be as specific as possible to avoid any issues. Using just the term “thank-you” as the rule might not be ideal, as it could result in displaying the ‘thank you’ page on other URLs that contain the word, leading to inconsistencies in showing the page exclusively upon successful form submissions.

4th Step – Lastly, make sure to give the trigger an appropriate name, such as “Pageview – Form Submitted Successfully”. The title should be clear and descriptive to maintain organization in your Google Tag Manager account in the long run.

Trigger Configuration for page view of thank you page

5th Step – Activate (or update) the Preview and Debug mode, and refresh a webpage containing the form you wish to monitor.

6th Step – Next, fill out the form by providing the necessary information and proceed to submit it. If you are successfully redirected to a designated “Thank you” page and the Google Analytics Tag is triggered, you were successful in your task! Additionally, you can test the process by submitting a different form on your website.

Now, navigate to the Debug View in Google Analytics 4. If you have multiple forms on your website, each with its unique “thank you” page, there is no need to configure any custom parameters for the GA4 event tag. GA4 inherently tracks the page_location, and you can differentiate form submissions using a dimension such as Page Path.

However, if you have multiple forms on your website that all lead to a single “Thank you” page, you will require a variable that holds a form identifier, such as the form ID or form name. This variable should be included as an additional parameter in the GA4 generate_lead event tag. For instance, you can use a parameter named form_id with its value set as {{custom – form id}}. By doing so, you can effectively track the locations from which your forms have been submitted.

How to Track Conversions for HubSpot Meetings?

Through our direct observation, we have noticed that many individuals have successfully implemented conversion tracking in GA4 for various call-to-actions, including Form Submissions and Purchases. However, they tend to overlook conversion tracking in GA4 for HubSpot Meetings. In this section, we will guide you on how to effortlessly and precisely track your HubSpot conversions using Google Tag Manager and GA4.

Step 1 – Implement a Hubspot Meetings Event Listener

With Google Tag Manager integrated into your website, you can leverage its capabilities to add a code that monitors HubSpot Meeting bookings. JavaScript events occur in the background when a booking is confirmed in HubSpot. The event you specifically want to monitor includes a data property, within which a meetingBookSucceeded boolean is set to true. To achieve this, you have to incorporate an Event Listener that actively searches for these particular properties. Events lacking these properties will not pass through this code, ensuring that no unintended actions occur. Once your JavaScript listener detects the event, you can push a new Custom Event into window.dataLayer. This enables the event to function as a trigger within Google Tag Manager, allowing you to activate other conversion codes as needed.

To accomplish this, navigate to the Tags section and click on “New.”

How to Track Conversions for HubSpot Meetings?

Select Custom HTML as the Tag Type. Give it a suitable name such as “HubSpot Meeting Booked Listener Script.” Set the trigger to activate on All Pages, ensuring that you can capture the event on all pages containing the Meetings module, including those created in the future. And include the code mentioned below the “HTML” option.

HubSpot Meeting Booked Listener Script

Step 3 – Create a Custom Event trigger in GTM

Now that we have set up the JavaScript message listener and added a new event to the data layer, we can proceed to create a Custom Event trigger in Google Tag Manager. Follow these steps:

a. Go to the Triggers section and click on “New.”
b. Select Custom Event as the Trigger Type.
c. Enter “HubSpot-meeting-booked” as the event name.
d. Set the trigger to activate on All Custom Events, indicating that it should check all custom events for a match with the specified event name. It is important to ensure that the event name entered here exactly matches the event name used in your window.dataLayer.push call.

Trigger for HubSpot Meeting Booking

Step 4 – Activate your conversion tags for the new Meeting Booked Event

Now that you have set up a GTM trigger that will be triggered when a Meeting is confirmed, you can proceed to configure other GTM Tags in a regular manner. This is beneficial because it allows you to reduce the amount of custom code required.

Step 5 – Finally Test

GTM offers a highly useful Preview feature that allows you to test and troubleshoot your configuration. Utilise this feature to ensure that your tags and triggers are functioning correctly.

How to Track Conversions for HubSpot Meetings?

Navigate to the web page where the HubSpot Meetings widget is located, and you will notice the Tag Manager preview pane opening at the bottom of your browser.

It’s important to note that only you can see this pane; other visitors to the page won’t have visibility of it.

To confirm that everything is working as expected, check if your “SCRIPT – HubSpot Meeting Booked Listener” tag fires when the page loads. This indicates that the code is actively listening to the JavaScript event.

How to Track Conversions for HubSpot Meetings?

Next, proceed to test the meeting booking functionality within the widget. Upon submitting the required information on the “Confirm meeting” page, observe whether your conversion tags are triggered and displayed under “Tags Fired on This Page”.

You can verify conversion tracking in GA4 by accessing the Realtime > Events and Realtime > Conversions sections. This will provide real-time information on the conversions that have been tracked.

Encountering difficulties in implementing GA4 for your website? Reach out to our Google Tag Manager + GA4 Specialist for expert assistance in seamlessly setting up your conversion tracking in GA4. With our help, you can ensure that you never miss any conversions moving forward.

Share this post!