Videos
How the tracker records video plays and how much of each video people watch
The tracker records two things for the videos on your site, with no code to add: a play (someone started the video) and progress (they reached 25%, 50%, 75% of its length, and 100% when it ended). Each video counts once per page view: replaying it, or pausing and resuming, does not add a second play.
| Event | Sent when | Main properties |
|---|---|---|
$video_play | Playback starts | provider, video_id, video_title, duration_s, time_to_play_ms, progress_tracked |
$video_progress | The position passes 25%, 50%, 75%, or the video ends | the same, plus percent (25, 50, 75 or 100) |
Progress follows the position in the video, so someone who skips ahead to the middle reaches 50% without watching the first half.
Videos on your own page
Videos in a <video> tag are tracked as they are. video_id is the video's
address without its query string, and video_title comes from the tag's
title or aria-label attribute:
<video src="/media/demo.mp4" controls title="Product demo"></video>Streaming players such as Video.js, hls.js or Mux play from a temporary
blob: address, so their videos have no video_id. Give each <video> a
title to tell them apart in reports.
Background videos (muted, without controls, and set to autoplay or loop) are skipped, because they play on every visit without anyone choosing to watch.
YouTube embeds
Add enablejsapi=1 to the embed address so the tracker can read the player's
position:
<iframe src="https://www.youtube.com/embed/VIDEO_ID?enablejsapi=1"></iframe>With it, YouTube embeds report plays and progress like your own videos, with
the title YouTube shows. Without it, the tracker sees only that someone clicked
into the player: you get a $video_play with progress_tracked: false and no
progress events.
Embeds added after the page loads, such as a thumbnail that swaps in the player
on click or a video modal, are tracked too, as long as their embed URL carries
enablejsapi=1.
Other players (Vimeo, Wistia, Loom) are not tracked yet.
Leave a video out
Add the fv-no-track class or the data-fv-private attribute to the video, the
iframe, or one of their containers.
