Google Tag Manager
intermediate
5 min read3 steps739 views

How to Track YouTube Video Views in GTM

Track embedded YouTube video engagement using GTM's built-in YouTube Video trigger. Enable YouTube Video variables in GTM, create a YouTube Video trigger for start, progress, and complete events, and create a GA4 Event tag. GA4 Enhanced Measurement also tracks video engagement automatically for embe

Event Trackingtrack youtube video views gtm

Quick Summary

Track embedded YouTube video engagement using GTM's built-in YouTube Video trigger. Enable YouTube Video variables in GTM, create a YouTube Video trigger for start, progress, and complete events, and create a GA4 Event tag. GA4 Enhanced Measurement also tracks video engagement automatically for embedded YouTube videos, but GTM offers more granular control.

Process Flow

Interactive diagram — drag to pan, scroll to zoom

Step-by-Step Guide

Follow these 3 steps to complete this guide

1

Enable Variables

Variables > Configure > enable Video Provider, Video Status, Video Current Time, Video Duration, Video Percent, Video Title, Video URL, Video Visible.
2

Create Trigger

Triggers > New > YouTube Video. Select capture options: Start, Complete, Pause, Seeking, Progress (add thresholds: 25%, 50%, 75%). Enable 'Add JavaScript API support to all YouTube videos.'
3

Create Tag

GA4 Event tag with event name 'video_engagement'. Parameters: video_title ({{Video Title}}), video_percent ({{Video Percent}}), video_status ({{Video Status}}).

Was this guide helpful?

Your feedback helps us improve our guides