GTM 101: how to setup scroll depth with Google Tag Manager

If you haven’t integrated scroll depth with your Google Analytics, you should consider doing this, especially if you have a lot of editorial content. The scroll data will give you a good insight on how users are engaging with your content, for example, you will be able to know how many users are actually getting to the bottom of the article or page.

The good news is that Google Tag Manager now has a built in trigger and variable that allow you to setup scroll depth tracking without any external plugins – you just need to make sure that Google Tag Manager is already installed on your website. In this tutorial we will show you how to set this up in GTM and send the data to your Google Analytics account.

Enabling the scroll depth variables

1. Once your logged in to your GTM account, click ‘variables’ on the left, then click ‘CONFIGURE’ under ‘Built-In Variables’.

GTM101-scroll-depth-1

2. Make sure you have all the variables ticked under ‘Scrolling’.

GTM101-scroll-depth-2

Create your Trigger

3. Now navigate to the ‘Triggers’ section and click ‘NEW’ to setup a trigger.

GTM101-scroll-depth-1

4. Click on choose a trigger type and select ‘Scroll depth’ under ‘User Engagement’.

GTM101-scroll-depth-4

5. Tick ‘Vertical scroll depths’ and put in the values that you want the event to occur on separated by commas, for example, setting this to 25, 50, 75, 90, 100 will fire the trigger when 25% of the page is visible, then 50% and so on…

*note if you set your first value as ‘0’, then the event will fire as soon as the page is loaded.

GTM101-scroll-depth-5

6. Now give your trigger a name as hit ‘SAVE’.

Create the tag

This is where the magic happens! we now need to create a tag to make use of the Trigger that we created earlier and send the data to your GA account.

7. Go to the ‘Tags’ section and click ‘NEW’ to create a new tag.

8. Click on ‘Choose a tag type to begin setup’ and select ‘Universal Analytics’. This is the most common but if your are using the Classic Google Analytics you can also pick that.

GTM101-scroll-depth-6

9. Next select ‘Event’ under ‘Track type’ and select the rest of the settings as follows:

GTM101-scroll-depth-7

Category: Scroll depth

Action: {{Scroll Depth Threshold}}

Label: {{Page URL}}

Google Analytics Settings: This is your Universal Analytics ID, if you have a variable created you can pick that, otherwise tick on override and enter your ID.

10. Finally, click on ‘Choose a trigger to make this tag fire’ and select the trigger that we have created earlier.

GTM101-scroll-depth-8

Now just Save your tag and publish your GTM container. That’s it you’re done! you should now get some event data in your Google Analytics account.

Need technical support? check out our Digital Agency!