Google Tag Manager

Setting up Google Tag Manager tags and tracking.

GTM + GA4: How to Track Videos on a Website

Youtube video tracking with GTM trigger and GA4

  1. Disable Video Engagement tracking features in Enhanced Measurement.
    Otherwise, there's a high risk of occasional duplicate data.

    How to disable Video Engagement tracking in GA4:
    GA4 Admin > Data Streams > Gear Icon > disable Video Engagement tracking. 
    Screenshot 2022-05-30 at 12.36.59 PM.png

  2. GTM > Create a Youtube Video trigger
    Screenshot 2022-05-30 at 12.39.10 PM.png
    Put the details as you see it above and then hit > SAVE

  3. GTM > Enable built-in video variables
    GTM > Variables > Configure > Select all variables that refer to videos
    Screenshot 2022-05-30 at 12.41.30 PM.png

  4. GTM > Create a GA4 tag
    GTM >Tags > New > GA4 Event Tag as you see it below
    Screenshot 2022-05-30 at 12.43.18 PM.png
    Don't forget to SAVE

  5. Test the setup in debug view

    1. Go to your website and find a page that contains a Youtube player, for example https://www.eskimi.com/about-us
      Then go back to GTM, refresh, select Preview and paste the link of the website.
      Choose CONNECT.
      Then, you will see that a new tab will open. Activate the video (in order to trigger the events that we just created).
      Screenshot 2022-05-30 at 12.47.42 PM.png

      Go back to GTM and see that the tag is fired :D 
      Screenshot 2022-05-30 at 12.47.56 PM.png

    2. GA4 > Debug view
      GA4 > Configure > DebugView > see the events
      Also, don't forget to add the events in the Custom Dimensions [in order to be able to add these dimensions into your reports (Explorations)]
      Screenshot 2022-05-30 at 12.52.41 PM.png

See how to make a Custom Report for Video Engagement Metrics here.

GTM Glossary

The Google Tag Manager terms used on these pages, in alphabetical order.

1–9

A

B

C

G

GTM Definition

What is GTM (Google Tag Manager)?

GTM is a tag management solution which acts as an intermediary between a website and 3rd party tracking tools.
You need to add the tracking codes to GTM and then configure the rules when they should fire.

Why using it?

1) With GTM we can test the tags to make sure they are triggered when we load a page or click a particular button.
2) We can change the tags without changing the website's source code.
3) GTM lets us manage various JavaScript tracking codes on a website.
4) Fast Deployment of Tracking Codes
5) All Tags in one place
6) Testing and debug tools
7) Tag templates > you don't have to setup everything from scratch
8) HUGE active community on FB
9) Versions of the container (you can restore everything)
10) Dynamic Tagging + Privacy Policies

How it works?

A tag is a piece of code that fires on a website under certain circumstances.
It can be a tracking code, some piece of code that changes the text or a particular website element, or even a code which changes the color of the browser's address bar, etc.
When you create a tag, you basically instruct Google Tag Manager to "do this", "do that", "track page views of this visitor", "track this click and send to Google Analytics" etc.
A trigger is a condition when a tag must fire.
Should a tag fire on all page views? Or maybe on certain clicks?
How about successful form submissions?
All these examples are triggers.
When a particular condition (or a set of conditions) is met, a trigger is activated and all the tags (linked to it) are dispatched.
A variable is the final member of this trinity.
Variables are little helpers that can be used in tags, triggers, or even in other variables.
A variable can:
▪ Hold a single piece of data (like page URL, website domain, product ID, text of a link, etc.)
▪ Hold a set of data/settings (Universal Analytics Google Analytics settings variable contains multiple settings related to GA, like Tracking ID, Display Advertising settings, etc.)
Screenshot 2022-05-31 at 2.00.01 PM.png