Collect player telemetry with CMCD

Edge servers see requests. They don't see whether the viewer's buffer was about to run dry, which rendition the player had chosen, or whether the session was playing or paused. Common Media Client Data is an open specification from the Consumer Technology Association that lets the player send that context along with each request — buffer health, bitrate, session IDs, and more.

Akamai supports CMCD v1 and v2.

šŸ“˜

CMCD is already on

CMCD works by default with Adaptive Media Delivery. Unless you need segment prefetching or custom CMCD logic, there's nothing to configure.

When to use this

  • You want richer log data so support can diagnose playback problems without a reproduction.
  • You want to correlate quality-of-experience with delivery behaviour in your own analytics.
  • You're setting up segment prefetching, which consumes CMCD hints.

CMCD v1 versus v2

The specification was updated for v2 in CTA-5004-B as of April 2026.

FeatureCMCD v1 (CTA-5004)CMCD v2 (CTA-5004-B)
Transmission modesRequest mode onlyRequest, Response, and Event modes
Data deliveryTightly coupled to media segment requestsDecoupled — can trigger on timers or events
Reporting endpointsSent back to the delivering CDNMulti-endpoint, can go directly to external analytics
Player stateImplicit, inferred from buffer and bitrateExplicit sta key: playing, paused, rebuffering
Network metricsLimitedIncludes TTFB, TTLB, and HTTP response codes
Primary focusCDN log enrichment and basic edge optimizationReal-time observability, dynamic multi-CDN steering
Analytics dependencyUsually needs heavy proprietary SDKs alongsideCan act as a lightweight, generic telemetry replacement

Keys added in v2

df dropped frames Ā· e event trigger Ā· ltc live latency Ā· msd media start delay Ā· pt playhead time Ā· rc response code Ā· sn sequence number Ā· sta player state Ā· ts timestamp Ā· ttfb time to first byte Ā· ttld time to last byte Ā· url request URL

Stream CMCD data into your logs

CMCD data is gathered automatically for visibility. To get it out, set up a log stream with the DataStream behavior, feeding DataStream 2.

When creating your stream:

  • The selected configuration must use Adaptive Media Delivery.
  • Under Common media client data, select one or more of the available data sets: CMCD, Delivery type, Delivery format, Media encryption.

A sample aggregated CMCD v1 payload:

//1.0@U/bl=9600,cid=%22ffmpeg-2s-synthetic%22,d=2000,dl=9600,mtp=6200,nor=%22segment_23.ts%22,ot=av,sf=h,sid=%22773a7679-225d-4c72-ae89-03fdf0406343%22,st=v,tb=0

And CMCD v2:

//2.0@U/cid=%22ffmpeg-2s-synthetic%22,d=2000,dl=0,mtp=10000,nor=(%22segment_1.ts%22%20%22segment_2.ts%22%20%22segment_3.ts%22),ot=av,sf=h,sid=%22ce7d0e6b-d9f4-4547-b412-4c08a1f3cd3c%22,st=v,sta=p,su,tb=0,v=2

See the DataStream 2 data set parameters for specifics.

Send CMCD from your player

Your player can transmit CMCD two ways:

  • One or more custom HTTP request headers
  • An HTTP query argument

Don't send both in the same request. If you do, the query argument is ignored.

šŸ“˜

Browsers should use query arguments

A CORS-restricted client — a web app in a browser — has to make a preflight OPTIONS request before it can send custom CMCD headers. The query argument method is recommended for browser clients; custom headers are recommended for everything else.

Follow the CMCD specification for the latest transmission recommendations.

Configure your environment to receive it

If your player sends custom HTTP headers

The headers are CMCD-Request, CMCD-Object, CMCD-Status, and CMCD-Session. They need to be allowed through CORS.

SituationWhat happens
A new environmentCMCD support is added to the Default CORS Policy rule automatically. The four CMCD headers appear in the New Header Value field of the Modify Outgoing Response Header behavior configured for Access-Control-Allow-Headers.
A new version of an existing environmentIf it contains the Modify Outgoing Response Header behavior — standalone or in the Default CORS Policy rule — the four headers are added automatically, provided Action is Modify or Add, Select Header Name is Access-Control-Allow-Headers, and New Header Value isn't the * wildcard.
You don't use the Default CORS Policy ruleAdd a Modify Outgoing Response Header behavior yourself. Set Action to Modify (replaces any incoming Access-Control-Allow-Headers) or Add (appends to it), set Select Header Name to Access-Control-Allow-Headers, and enter the four CMCD headers in New Header Value.

If your player sends query arguments

Two things to get right.

Keep CMCD query arguments out of the cache key. CMCD data changes on every request — caching on it inflates origin load and hurts performance. In the Cache Key Query Parameters behavior, set Behavior to either:

  • Exclude all parameters (recommended) — the default in a new environment.
  • Include only specified parameters — if you genuinely need some query arguments cached, list only those and make sure no CMCD argument appears.

Make sure the player doesn't also send CMCD headers, because headers take precedence over query arguments.

Use CMCD to drive prefetching

The same data can tell edge servers what to fetch next. See Prefetch the next segment for the bl, nor, and nrr keys and the Common Media Client Data support behavior.

Caveats

IssueDetail
Log sizes grow with prefetchingEntries can go from roughly 300 bytes to 512. Factor it into your DataStream 2 collection and retention.
Not supported with media encryption for DASHApplies to CMCD prefetching. See Encrypt media segments at the edge.

Related


Did this page help you?