Skip to content

Track video

The pixel finds every <video> element on the page and measures it, with no event listeners of your own. That covers a plain <video> tag and players built on one, including video.js, hls.js, Plyr, and JW Player.

GroupWhat you get
PlaybackPlays, pauses, replays, seeks
ProgressWatch time in seconds, and 25%, 50%, 75%, 100% milestones
QualityResolution changes, buffering events, startup time
SessionFullscreen, picture-in-picture, subtitles on and off, mute
ProblemsPlayback errors with their error code
webstats('video', '#player', { id: 'summer-recap-2026', title: 'Summer recap' });

Without a name, a video is identified by its file URL, which changes when you re-encode or move a file and splits your reports in two.

The first argument is a CSS selector for the <video> element or any element containing it. Call it before or after the player appears: the pixel applies the name when the element mounts.

KeyRequiredWhat it does
idrecommendedYour own stable id. Keep it the same over time. Leave it out and the pixel derives one from the file name, then from the player’s position on the page, both of which move.
titlerecommendedThe name shown in reports.
typeoptionalmovie, tvshow, anime, and the rest. See content types.
tmdboptionalTMDb id, for catalog matching.
imdboptionalIMDb id, for catalog matching.
seriesoptionalSeries title, for an episode.
seasonoptionalSeason number.
episodeoptionalEpisode number.

A fuller call, with provider ids so plays match the catalog:

webstats('video', '#feature', {
id: 'shawshank',
title: 'The Shawshank Redemption',
type: 'movie',
tmdb: '278',
imdb: 'tt0111161',
});

For an episode, swap in series, season, and episode. For several players, make one call per player, each with its own selector.

webstats('video', ...) labels one player, webstats('content', ...) labels the page. Most catalog sites send both.

The pixel and the naming call both go inside the frame. See Iframes.

Play a few seconds on a page with a video, then open the Video screen in your dashboard. Plays appear within seconds. Completion rate and average watch time roll up once the viewing session ends, so allow a few minutes after closing the tab.