HTML5 Video Tracking in LMFX, Matching Our Existing YouTube Setup

Black and white photo of Ron Geronimo Posted by: Ronel Geronimo Date Posted: November 5, 2026
Back to Case Studies

Issue

Joseph Tree Service had a self-hosted MP4 video on their Divi site, and we had no way to see whether anyone was watching it. Our existing video tracking only covers YouTube embeds, so a plain HTML5 video player was invisible to RevenueCloudFX. Although there’s an existing guru that tracks HTML5 videos, it does not work exactly as the YouTube setup. We needed something that matched our YouTube structure and sent clean data to RCFX, so we wrote our own.

Solution

We mirrored how the YouTube setup already works. A small script waits for the page to load, listens to the video’s built-in play, pause, and end signals, and pushes one consistent event to the dataLayer (GTM’s shared message board) with the status, the percent watched at 25/50/75, and the video’s title and URL. A lookup table translates those values into the same labels the YouTube setup uses. A Custom Event trigger then fires a tag that sends the event to RCFX, structured just like the existing YouTube tag.

Achievement

Video engagement on self-hosted videos now shows up in RCFX the same way YouTube engagement does, with no separate reporting logic. Since the structure matches the YouTube setup, the same tags and lookup can be reused on any client site with HTML5 video.

Snippet/Screenshot/Link

Check cHTML – HTML5 Video Listener tag within GTM-T5X7FBGR for more information about this code.