How to set up Google Analytics percent scrolled dimension
In order to utilize the Percent page scrolled metric for Google Analytics, you will need to set up a custom scroll depth tracking dimension for your website(s)
Note
PageBuilder Editor's Integrated Analytics only supports Google Analytics 4. This documentation is to set-up the custom dimension for GA4 through Google Tag Manager. You will need to have Google Tag Manager set-up for your website and the script implemented on your pages.
Before getting started, make sure you have the following information on hand:
Measurement ID for your Google Analytics Account
Create scroll depth trigger in Google Tag Manager
Login to your organization's Google Tag Manager Account. On the lefthand side, select Triggers.
This will then open the Triggers landing page. To create a new Trigger, click the New button. This will open the Trigger Configuration panel. Click the pencil icon to create a new trigger. From the Choose Trigger Type righthand panel, select Scroll Depth under User Engagement.
For your scroll depth configuration, name your trigger and check Vertical Scroll Depths and under Percentages input the following numbers: 10, 25, 50, 75, 90, 100. For the Enable this trigger on: field keep the default Window Load (gtm.load) setting and for This trigger fires on select All Pages. Then press the Save button.
Configure scrolling variables
Afterwards, navigate to the Variables workspace page which can be accessed from the lefthand menu. Here you will need to configure your built-in variable for scrolling.
To do this, click the Configure button-- this will open a righthand panel. Scroll down to Scrolling. Check the Scroll Depth Threshold box, Scroll Depth Units box, and Scroll Direction box.
Create tag for scroll tracking
Now, you will need to create a new tag for scroll tracking. From the lefthand menu, click Tags. Once on this page, click the New button on the righthand side to create a new tag for your scroll tracking. First, give your tag a name that will make it easy to identify. Click the pencil icon for Trigger Configuration. From this list, select Google Analytics: GA4 Event.
This will open the Tag Configuration window. Under Configuration Tag, select None - Manually Set ID from the dropdown. Input the following information:
Measure ID: This is found under Data Streams in Google Analytics Admin
Event Name: {{Scroll Depth Threshold}}
Open the collapsed Event Parameters section. Input the following information:
Parameter Name: scroll_depth
Value: {{Scroll Depth Threshold}}
Once this is completed, scroll down within the same window to set a trigger for the tag. Click the pencil icon and from this list select your Page Scroll Trigger. Then click Save in the righthand corner.
You will then be redirected to Google Tag Manager Workspace and should see your newly created tag. The final step is to publish your tag so that it is active. To do this, click Submit found at the top action bar. This will open the Submission Configurations panel. Give your dimension a name and once you've filled out this information, click Publish.
Create custom dimension in Google Analytics
The final step is to create the custom dimension in Google Analytics within Custom definitions workspace. To get to this workspace from the Google Analytics landing page, click on the Configure icon on the lefthand workspace panel.
This will open the Events workspace by default. From the lefthand navigation list, select Custom definitions which is where you can view created custom dimensions and create new custom dimensions. Once on this screen, click on the Create custom dimensions button in the righthand corner.
This will open the New custom dimension panel on the lefthand side. Input the following information in the respective fields:
In the Dimension name field type: scroll_depth
In the Scope field, select Event from the dropdown
In the Description field, type: Scroll depth
In thee Event parameter field, type: scroll_depth
Once this information has been input, click the Save button.
Upon completing these steps, you should be able to see percent page scroll data display for your pages within PageBuilder Editor's Analyze workspace in 24 hours.