Docs

Video

The video plugin measures how far people really watch, not just whether they pressed play.

Automatic capture

Every <video> with controls, or inside [data-x3-video], is tracked:

<video src="/media/product-tour-landscape.mp4" controls></video>
<div data-x3-video="hero-reel"><video src="/media/reel.mp4" autoplay muted loop playsinline></video></div>
  • Id: data-x3-video, else the file name without extension. Suffixes -landscape, -portrait, -quer, -hoch are stripped, so the formats of one video aggregate under one id.
  • Format: data-x3-video-format (landscape / portrait), else from the video's dimensions, else unknown.
  • Plays: a new play starts from < 1 s or after ended; resuming is the same play. At most 10 plays per pageview.
  • Watched seconds count only normal playback (time advancing by less than 1.5 s per update, not while paused); seeking closes the current range.
  • Coverage: a 100-bucket bitmap (each percent of the duration) plus merged watched ranges.
  • Completed = the video ended and at least 90 % of it was covered.
  • Events: video_start {video, n, format} and video_complete {video, n} (sent immediately).

Video without controls and outside a marked wrapper: x3.video.track(element, { id: "teaser" }).

Custom players (YouTube, Vimeo, Wistia …)

Feed positions from the player's API; 3x builds coverage the same way:

const tracker = x3.video.custom("webinar-2026", { format: "landscape", src: "youtube" });

player.on("play", () => tracker.play(player.currentTime, player.duration));
player.on("timeupdate", () => tracker.progress(player.currentTime, player.duration));
player.on("pause", () => tracker.pause(player.currentTime));
player.on("seeked", (from, to) => tracker.seek(from, to));
player.on("ended", () => tracker.ended());

Reports

  • GET …/analytics/videos – per video: plays, start rate (vs pageviews of pages showing it), average watched seconds, coverage, max position, completion rate, duration, per format.
  • GET …/analytics/videos/{video}/retention (MCP analytics_video_retention) – 100-point retention curve overall and per format.
  • Relevance: video started, ≥ 30 s watched, ≥ 50 % covered and completed add points (Relevance score).

Duration is capped at 2 hours.