ProjectsAnalytics
Player telemetry on Analytics Engine
Startup time, stalls and errors from your own players, stored and queried on Cloudflare
Example design
- 01CollectA small script in the player records startup time, stalls, bitrate changes and errors for each session.
- 02Send in batchesEvents go to the Worker in batches with sendBeacon, including a final batch when the page closes.
- 03WriteThe Worker adds the country and network from the request and writes one data point per event, with the session ID as the index.
- 04Ask for a chartThe dashboard asks the Worker for a chart, and the Worker runs SQL against Analytics Engine.
- 05Rows backStartup time and stall rate by player version, country and network come back, weighted by the sample interval.
- ifA player release makes things worseEvery event carries the player version, so comparing the new release with the previous one is one query, on the day it ships.
The problem
Most teams find out about playback problems from support tickets. Commercial QoE products measure playback quality, but they cost a lot per session and the data lives in someone else's system. For many platforms a small player script, a Worker and Analytics Engine are enough to see startup time, stalls and errors by player version, country and network, and to see them on the day a release ships.
What it uses
- Workers
- Event intake and the query API for dashboards
- Analytics Engine
- Event storage and SQL queries
- D1
- Daily rollups kept beyond three months
The decisions, and why
- IndexSession ID
- The index is Analytics Engine's sampling key. Sessions are what the charts count, so the session ID is the natural choice.
- TransportBatched beacons
- Batching keeps request counts down, and sendBeacon still delivers when the viewer closes the tab.
- IdentityNo user IDs
- Country, network and player version are enough for these charts, and identifying viewers would add risk.
- HistoryDaily rollups in D1
- Raw events last three months. Rollups keep the long-term trend for comparing seasons and big events.
Limits to plan around
- Analytics Engine keeps raw data for three months.
- A single request can write up to 250 data points.
- Each data point has one index, up to 20 text fields and up to 20 numbers.
What you get
- Telemetry script for your players
- Intake and query Worker
- Dashboard for startup, stalls and errors
- Release comparison view
- Daily rollup job
Related product
Playback Signal: quality of experience telemetry from the player out.
Read about Playback SignalOther projects
More video work on Cloudflare.
- Serverless video platformUploads, encoding, captions and signed playback with no servers to run
- FFmpeg encoding on Cloudflare ContainersYour own ladder and packaging, started by an upload, served from R2
- Sub-second live with WHIP and WHEPLive auctions, Q&A and watch-alongs where a few seconds of delay is too much
- Searchable video archiveFind the moment in hours of recordings by what was said
- Thumbnails and previews by URLHover previews, thumbnails and storyboards for a clip library, with no batch jobs
- Instant clips from a live streamViewers clip the moment they just saw and share it while the event is still on
DRM solutions
Three corporate use cases, each with a Widevine demo that runs in your browser and checks what your device supports.
Talk about your video project
Tell us what you are building, or what is not working in the platform you have.
128 City Road, London, EC1V 2NX, United Kingdom
17420568
Registered in England and Wales