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.
Measured with no extra code
Section titled “Measured with no extra code”| Group | What you get |
|---|---|
| Playback | Plays, pauses, replays, seeks |
| Progress | Watch time in seconds, and 25%, 50%, 75%, 100% milestones |
| Quality | Resolution changes, buffering events, startup time |
| Session | Fullscreen, picture-in-picture, subtitles on and off, mute |
| Problems | Playback errors with their error code |
Name a video
Section titled “Name a video”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.
| Key | Required | What it does |
|---|---|---|
id | recommended | Your 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. |
title | recommended | The name shown in reports. |
type | optional | movie, tvshow, anime, and the rest. See content types. |
tmdb | optional | TMDb id, for catalog matching. |
imdb | optional | IMDb id, for catalog matching. |
series | optional | Series title, for an episode. |
season | optional | Season number. |
episode | optional | Episode 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.
Naming the page instead of the player
Section titled “Naming the page instead of the player”webstats('video', ...) labels one player, webstats('content', ...)
labels the page. Most catalog sites send both.
Players in an iframe
Section titled “Players in an iframe”The pixel and the naming call both go inside the frame. See Iframes.
Verify
Section titled “Verify”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.