Blog

How to Create ‘Duration’ Goals in Google Analytics 4

google analytics 4 dashboard with duration goals

As you may have heard, on July 1st, 2023, Google’s ‘Universal Analytics’ platform will officially retire and cease processing hits – and you’ll only have access to that previously-processed data for ~6 months afterwards.

This announcement has led many marketers to make haste in migrating their Universal Analytics accounts to the new Google Analytics 4. The process, however, hasn’t been easy.

Want to have a team of experienced marketing engineers handle your UA -> GA4 migration? 3.7 Designs is now offering a complete Universal Analytics to Google Analytics 4 transfer service. Send us a message if you’d like to avoid the headache.

Google Analytics 4 introduces an entirely new process and structure for tracking goals revolving around ‘Events,’ and as a result, many Universal Analytics Goal types (like Duration goals) are left hanging.

Can you create ‘Duration’ & ‘Time on Page’ goals in Google Analytics 4 (GA4)?

Unfortunately, from what we can tell, the answer is ‘No.’

While GA4 does “automatically collect a number of engagement dimensions and metrics” using the ‘user_engagement’ event, it appears you can only use this event “as a proxy for Page/Screens per visit and Average Session Duration goals.”

So, what can we do?

An alternative to ‘Duration’ goals in Google Analytics 4

In our experience, the main use case for ‘Duration’ goals in Universal Analytics was determining whether a user was fully engaged with a web page. For instance, if a user spent 2 minutes browsing a page, a ‘Duration’ goal could fire to tell us they had (most likely) taken in all the necessary information on that page.

But it still doesn’t give us the information we’re looking for with accuracy.

What if the user stepped away from their computer after loading the page? What if they got stuck reading a section on the top of the page but exited shortly afterwards? The Goal would fire, but the information wouldn’t be valuable.

Luckily, Google Analytics 4 provides another Event option that can give us more accuracy into our users’ engagement with our pages, and that’s Scroll Events.

Scroll Events in Google Analytics 4

If you’ve enabled ‘Enhanced measurement’ in your GA4 Data Stream, many different Events are captured automatically:

  • Page views
  • Scrolls
  • Outbound clicks
  • Site search
  • Video engagement
  • File downloads
google analytics 4 enhanced measurement duration goal tracking interface

…but we still have a problem.

The automatic “Scrolls” tracking only fires “the first time a user reaches the bottom of each page (i.e., when a 90% vertical depth becomes visible).” So what if we wanted to track when a user scrolls 50% of the page? 15%? 75%?

Luckily, these goals are still possible to create with Google Tag Manager.

Creating ‘Scroll’ events in Google Tag Manager

To start, you’ll need to ensure you’ve installed Google Analytics 4 via Google Tag Manager. The process is simple (and in our opinion, well worth it!).

Let’s begin.

Enable Scrolling Variables

First, we’ll need to enable some ‘Scrolling’ variables by heading to ‘Variables’ in the left-hand menu and checking the “Scroll Depth Threshold,” “Scroll Depth Units,” and “Scroll Direction” variables:

google tag manager scroll tracking variables setup

Creating Scroll events with a tag

Next, we’ll create a single tag that fires for different scroll depths on a page (like 10%, 25%, etc.). To do this, we’ll head to “Tags” in the left-hand menu and click “New:”

The tag creation process is simple. You’ll start by selecting your GA4 configuration tag under the “Configuration Tag” dropdown.

Next, you’ll need an event name. In our case, we’d like our events to appear in Google Analytics like so:

25% Scroll
50% Scroll

…and so on. To do this, click on the “+” icon to the right of the ‘Event Name’ input and select the “Scroll Depth Threshold” option:

scroll depth threshold data layer variable in google tag manager

Now you can simply add “% Scroll” after the Data Layer Variable in the Event Name input like we’ve done here:


If you’d like to have a team of experienced marketing engineers handle your UA -> GA4 migration, 3.7 Designs is now offering a complete Universal Analytics to Google Analytics 4 transfer service. Send us a message if you’d like to avoid the headache.


Now let’s set the Trigger. To start, click on the Triggering section, click the “+” icon in the top right-hand corner, click within the “Trigger Configuration” box again, and select “Scroll Depth:”

scroll depth trigger google tag manager configuration

For our use case, we want to track “Vertical Scroll Depths,” so we’ll select that checkbox. Now we can simply paste a list of scroll percentages we’d like the trigger to fire on. In our case, we’ll paste in 10,25,50,75,90 and save the variable:

Now our Event is complete! Let’s save the tag and test it.

Testing the Scroll event in Google Tag Manager

To test the Events, we’ll use Google Tag Manager’s “Preview” functionality. To start, click the “Preview” button in the top right-hand corner:

Next, enter your website’s URL and click “Connect.”

google tag manager tag assistant scroll depth events

Your site – along with a GTM Tag Assistant window – should now appear in a new browser tab. After scrolling down the page, head back to the Tag Assistant and check to see if any “Scroll Depth” events are firing in the right-hand menu. You can click into each event and view the “Data Layer” tab (or the API Call at the top of the page) to see which Depth event was fired.

In the case below, we had multiple events fire, and we can see (where the arrows point) the latest event triggered once we scrolled 50% of the page:

viewing scroll depth data layer events in google tag manager tag assistant interface

Testing the Scroll event in Google Analytics 4

You can also check to see that your Scroll events are firing with the correct naming convention (ex. “10% Scroll”) within Google Analytics. With the Tag Assistant in GTM running, head to your Google Analytics 4 account and click on “DebugView” on the “Configure” page:

google analytics 4 debug view

Now do a few scrolls on the site. You should see your events appear on the page in chronological order with the correct names, as well as the number of times they’ve occurred in the last 30 minutes:

But what if you want to mark these events as conversions?

Luckily, Google Analytics 4 will automatically add these Scroll events in “Event Configuration” for you – all you have to do is mark them as conversions. Simply head to “Events” under the “Configure” page, find the scroll event, and click “Mark as conversion:”

marking scroll events as conversions google analytics 4

And that’s it!

In the future, we hope Google Analytics 4 will add functionality that supports Duration goals. But in the mean time, Scroll events should help you track engagement with your pages on a deeper level.

Confused? We don’t blame you.

Making the switch from Universal Analytics to Google Analytics 4 is not an easy task (trust us: Google’s multi-hour support documentation walkthrough doesn’t help much.) Many business owners just don’t have the time to learn all of GA4’s new features and complexities.

Luckily, we can help.

If you’d like to have a team of experienced marketing engineers handle your UA -> GA4 migration, 3.7 Designs is now offering a complete Universal Analytics to Google Analytics 4 transfer service. Send us a message if you’d like to avoid the headache.