• Courses
    • Courses
    • Course bundles
  • Blog
  • Services
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Services
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • About
    • About
    • Contact
  • Login

March 28, 2021

Track Conversions Once per Session in Google Analytics 4

In Universal Analytics, a goal (a.k.a. conversion) was counted once per session. If a visitor completes the same goal multiple times during the same session, it will be counted only once.

In Google Analytics 4, on the other hand, conversions are tracked every time they occur (regardless of whether it’s the same session or not). 3 form submissions during the same session? That’s 3 conversions. Is this a good thing? That’s up to you to decide.

If you want to count every occurrence of conversion, then you don’t need to do any additional tweaks in GA4. But if you want to limit conversions to fire only once per session, this guide is for you.

In today’s blog post, I will explain how to track conversions once per session in Google Analytics 4 (even if a user/visitor completes it multiple times).

To do that, we will use Audience Triggers.

 

Table of contents

+ Show table of contents +

  • Here’s what we are going to do
  • Create audience
  • Configure conversion
  • Test
    • Option #1. GA Debugger Chrome Extension
    • Option #2. GTM Preview mode
    • Option #3. debug_mode event parameter
    • Check the DebugView
    • If you can’t see that conversion in the DebugView
  • Haven’t noticed any caveats
  • Final Words

 

 

Video tutorial

Prefer video content? Here’s a tutorial for you from my Youtube channel.

 

Here’s what we are going to do

Every time a user completes a certain action on your website (and you send an event to Google Analytics), we will add such a user/visitor to an audience.

Google Analytics 4 offers a feature called “Audience triggers”. When a visitor enters an audience, GA4 can be configured to automatically generate an event. And then you can mark that event as a conversion.

Example: If you want to track generate_lead event as a conversion only once per session, you will have to:

  • Create an audience where you include visitors who complete the following sequence within the same session: first event is session_start, and then the next step is generate_lead event. It’s important that the first event in the sequence is session_start (it helps us limit everything to “once per session” because session_start occurs only once per session).
  • Then you configure an audience to dispatch an audience trigger. That will generate an event that you will call au_generate_lead_once_per_session. You can use any other name here. “au” means “audience”. Also, you will need to configure the audience trigger to fire every time the user’s membership in the audience refreshes.
  • Then you register a conversion in Google Analytics 4 interface where the event name is au_generate_lead_once_per_session. 

 

Create audience

First, we have to go to the Google Analytics 4 interface and create an audience that includes sessions with session_start event that is followed by your certain event (that you want to track as a conversion “once per session”). In my example, I will be using generate_lead event.

In GA4, go to Audiences and click New audience. Then select Create a Custom Audience and enter the following settings:

#1. Remove the prefilled Include users when block

#2. Click Add Sequence

#3. Select Within the same session as a sequence scope

#4. Then enter 2 steps:

  1. Event name = session_start (no other settings are needed)
  2. Event name = generate_lead (no other settings are needed). If you want to track another conversion as “once per session”, then enter that event’s name here.

What we are doing here is that we are interested in sessions where a session_start event occurs and then it is followed (at some point) by our “important event”. If it occurs multiple times during the same session, the user’s status in the audience will not be refreshed because it is impossible for the session_start event to occur more than once during the same session.

Then on the right side of the screen, click Create new in the Audience Trigger section.

Google Analytics 4 is capable of automatically firing an event when a user enters a certain audience. In our case, if we see that a visitor started a session and then completed a certain event, he/she will enter the audience and we will get some custom event in the reports.

We have to give a name to that event. Let’s call it au_generate_lead_once_per_session. It’s not a short name but it’s a clear one:

  • au stands for “audience”. This means that the event was generated by the audience trigger.
  • generate_lead shows the original event on which this event is based.
  • once_per_session is self-explanatory

Also, click the checkbox “Log an additional event when audience membership refreshes”. If a visitor initiates multiple sessions and during each session, completes a conversion, audience trigger will dispatch the event once again.

Save the audience trigger.

Finally, let’s name the audience. I’ll call it generate_lead once per session. Click Save.

Within 24 hours, you will start seeing the new event in the standard reports (and Analysis Hub) of Google Analytics 4. And speaking of the Real-time reports, those events will start appearing very soon.

 

Configure conversion

The next step is to turn that au_generate_lead_once_per_session event into a conversion. On the left sidebar of Google Analytics 4, go to Conversions and click New Conversion Event.

Enter the name of the event. It must be exactly as you defined in the previously created audience. In my case, that’s au_generate_lead_once_per_session.

Save the conversion.

 

Test

Now, let’s check everything. However, as of the moment of publishing this blog post, there might be some issues with the DebugView. But you can still try your luck.

First, we have to enable the GA4 Debug View and there are several ways how you can do that:

  • Enable the GA debugger Chrome extension
  • Have enabled Google Tag Manager’s Preview mode on a page that you’re debugging
  • Send a debug_mode parameter together with an event

Choose whatever you like the most.

 

Option #1. GA Debugger Chrome Extension

Your first option is to install the extension here. Once you do that, then click the extension’s icon (so that you can see the ON ribbon).

From this moment, start interacting with the website, and eventually, you will see your events coming into the DebugView (unless you have filtered out the developer traffic too).

Why does this happen? When the Debugger extension is installed and activated, it checks all the requests sent to Google Analytics 4 and adds an additional parameter needed for the DebugView to display the data. That parameter is _dbg:

 

Option #2. GTM Preview mode automatically makes the data visible in the DebugView

If you have implemented GA4 with Google Tag Manager and are currently debugging the setup with Preview and Debug mode, then there is nothing else you need to do. Just like the GA Debugger Chrome extension, the GTM Preview mode adds an additional parameter that instructs Google Analytics 4 to display that incoming data (from your browser) in the Debug View.

 

Option #3. debug_mode event parameter

If you want to make the data visible in the DebugView even while the GTM Preview mode is disabled (and you don’t want to install the browser extension), you can add the debug_mode parameter to the events. To enable the parameter, you have to add the debug_mode to the GA4 tag and then enter any value (but “true” without quotation marks makes the most sense).

You have two choices where to include the debug_mode parameter:

  • In the GA4 configuration tag (then all the other events tags that are using it will also inherit the parameter)
  • Or only in certain GA4 event tags. In that case, the debug_mode parameter will be applied only to those tags and only those particular events will be displayed in the DebugView of Google Analytics 4

Let me show you how to do that with the GA4 Configuration Tag.

In Google Tag Manager, you can do that by opening the GA4 Configuration tag and adding the following parameter:

If the debug_mode parameter is set to true, the event will be seen in DebugView.

Personally, I usually go with Option #1 or Option #2.

 

Check the DebugView

Once you enable the GA4 DebugView, go to DebugView (at the bottom of the left GA4 sidebar). Then go to your website (where you plan to track that conversion) and complete that action/event (that is included in the sequence of your GA audience).

Then go back to the GA4 DebugView. If you see more than one device, try to locate your device/browser.

Once you do that, you could see the original event (e.g. generate_lead) and it is followed by the audience trigger’s event. In my case, I would expect to see the generate_lead event first and then see the au_generate_lead_once_per_session event.

If you see it, that’s good. If you can’t see it (while other events are visible), don’t worry. This happens to me as well sometimes.

 

If you can’t see that conversion in the DebugView

You could wait for 10-15 minutes and then maybe you will see it in the Real-time view of Google Analytics 4.

If that also didn’t help, then wait for 24 hours and check the regular event reports in Google Analytics 4 (by clicking the Events section on the left sidebar of GA4). You should definitely see your event there.

If you can’t, you misconfigured something else in your setup (maybe you are not even getting that original event in your reports? In my case, the original event is generate_lead). Carefully re-read the guide and triple-check if you configured everything correctly.

 

I haven’t noticed any caveats of this solution yet

Recently, I published a guide on how to track conversions where you are interested in the number of pageviews per session (e.g. 3 pageviews per session). That solution had some caveats.

Luckily, the blog post that you’re currently reading has no big caveats. I compared the numbers in BigQuery and they match (or are very close). I was comparing the count of au_generate_lead_once_per_session events vs how many sessions contained at least one generate_lead event. Usually, the daily numbers matched 100%. Sometimes, several events were missing, thus the accuracy was still at 98-99%.

By the way, thanks to Ateeq for helping me with BigQuery in this case.

 

Track conversions once per session in Google Analytics 4: Final Words

Is Google planning to implement some built-in 1-click solution to limit conversions to once per session? I don’t know. But instead of waiting for something like this, you could employ audience triggers and build a solution that I’ve described in this blog post.

I wish there were fewer steps to do this but what we have today is still better than nothing (of course, if you need this at all).

But if you are OK with tracking the same conversion multiple times per session (if the visitor actually completed it multiple times), then you don’t have to worry about any of this.

 

Julius Fedorovicius
In Uncategorized
4 COMMENTS
Tom
  • Mar 30 2022
  • Reply

Thank you very much for this.

Are you aware of a way to implement this with GTM?

It is crazy that this workaround is required.

A lot of lead gen businesses have a 'thank you' page conversion which can and are often viewed several times.

To not have a native solution built in to GA4 for this is a huge limitation. And now they say we must transition by next year.

Google Ads has a tick box option for their conversion actions.

    Julius Fedorovicius
    • Apr 13 2022
    • Reply

    You would need to create a custom solution that relies on Cookies and Custom JavaScript. This is much more advanced than the workaround explained in this article.

Wei Zhang
  • Jun 15 2022
  • Reply

Hi Julius, thank you for your guideline for this. I followed each step, but the conversion is not working. From DebugView, I can only see page_view and inquiry_form_submission (your generate_lead). I wonder if you could provide some suggestions. Thank you.

Scott
  • Aug 30 2022
  • Reply

Love the walk-through - thank you! I also set the Membership Duration to the maximum limit to make it a once-per-user audience, which is an even better fit for my situation.

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Track Videos with Google Analytics 4 and Google Tag Manager
  • Debugging Incorrect & Missing Google Analytics 4 Transactions
  • A Guide to Referrer in Google Tag Manager
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings