How do I track video interactions (like play and pause) in GA4?

Applies to: Google Analytics 4 (GA4)
Last updated: May 2025


Problem

You want to track user engagement with embedded videos—such as when users play, pause, or complete a video—to better understand content performance and user interest.


Solution

GA4 doesn’t track video interactions by default. To track video plays, pauses, and completions, you need to use Google Tag Manager (GTM) and set up custom events based on your video platform (e.g., YouTube).


Step-by-Step Guide for Tracking YouTube Videos via GTM

Step 1: Enable Built-In Video Variables in GTM

  1. Go to https://tagmanager.google.com
  2. Open your GTM container
  3. Go to Variables
  4. Click Configure under Built-In Variables
  5. Enable all Video variables:
    • Video Title
    • Video Provider
    • Video Status
    • Video URL
    • Video Percent
    • Video Current Time
    • Video Duration

Step 2: Create a YouTube Video Trigger

  1. Go to Triggers > New
  2. Choose Trigger Type: YouTube Video
  3. Configure:
    • Trigger on: All Videos or specific videos
    • Capture:
      • Start
      • Complete
      • Pause
      • Seek
      • Buffer
      • Progress (optional: 10%, 25%, 50%, 75%, 100%)
  4. Name the trigger (e.g., “YouTube Video Events”) and save

Step 3: Create a GA4 Event Tag for Video Interactions

  1. Go to Tags > New
  2. Choose Tag Type: GA4 Event
  3. Set your configuration tag or measurement ID
  4. Set:
    • Event name: video_event
    • Event parameters (click “Add Row” to include the following):
Parameter NameValue
video_title{{Video Title}}
video_status{{Video Status}}
video_percent{{Video Percent}}
video_url{{Video URL}}
  1. Attach the YouTube Video Trigger from Step 2
  2. Save and publish

Step 4: Test in Preview Mode

  1. Click Preview in GTM
  2. Interact with your video (play, pause, complete)
  3. Check if the video_event fires correctly
  4. Use GA4 DebugView to confirm the event is received

Optional: Register Parameters in GA4

  1. Go to Admin > Custom Definitions > Create Custom Dimension
  2. Register any custom parameters (e.g., video_title, video_status) so they appear in reports and Explorations

Viewing Video Data in GA4

  • Go to Reports > Engagement > Events
  • Find the video_event
  • Use Explorations to break down events by title, status, or percentage watched

Notes

  • This approach is specific to YouTube videos embedded with the JavaScript API
  • For other platforms (e.g., Vimeo, Wistia), you’ll need a different integration or developer support
  • You can rename video_event to something more specific (e.g., video_play, video_pause) using separate GTM tags if needed

You may also like...