• Members 24 posts
    Oct. 31, 2023, 11:24 a.m.

    Hi,
    I want to implement scroll depth tracking in GA4. Is it to be done via GTM? Can you please let me know the procedure. Thanks!

  • Mod
    Oct. 31, 2023, 11:42 a.m.

    For this you'll have to create a scroll depth trigger, a GA4 event tag, and a custom dimension in GA4. Here are all the necessary steps:

    Steps to create custom event in GA4

    You can create custom events in GA4 without the help of Google Tag Manager, but for most custom events, you will need to create a GA4 event tag in GTM and pair it up with a proper trigger. Here are the steps involved in the process:

    1. Install Google Tag Manager container code on your website if you don't have it already.
    2. Set up your GA4 Configuration tag within your GTM container code.
    3. Create a scroll depth trigger that includes the specific vertical scroll depth percentages that you want to track.
      1.jpg

    To create a scroll depth trigger, you need to select the "Scroll Depth" trigger type and specify the percentages you want to track. You can also specify whether the trigger fires on all pages or only on some pages.

    1. Create a GA4 event tag with the “scroll_depth” event parameter to send your scroll depth percentage information to GA4.
      2.png

    To create a GA4 event tag, select the "GA4 Event" tag type and associate it with your GA4 property. Set the event name and parameter using the variable {{Scroll Depth Threshold}} to pull in the vertical scroll depths you selected in configuring your trigger.

    Note: You should include the vertical scroll depths you chose when designing your trigger, you should define an event parameter using the variable "Scroll Depth Threshold." Remember that you have to set up your built-in variable for this if you haven't already.

    1. Pair your GA4 event tag with your scroll depth trigger.
      3.png

    2. Test to confirm everything is working as expected and publish your GTM container to make your tag and trigger live.

    3. Register a custom dimension in GA4 for your scroll_depth event parameter.
    4. Turn off the enhanced measurement event in the GA4 interface for scroll tracking to prevent duplication in your data.
      4.png

    The process is complete. If you have any queries, do reach out

    4.png

    PNG, 49.8 KB, uploaded by agkhy on Oct. 31, 2023.

    3.png

    PNG, 47.5 KB, uploaded by agkhy on Oct. 31, 2023.

    2.png

    PNG, 40.9 KB, uploaded by agkhy on Oct. 31, 2023.

    1.jpg

    JPG, 54.0 KB, uploaded by agkhy on Oct. 31, 2023.