Ping

The ping event is a heartbeat that keeps the session alive and tracks playback progress. Send it on a timer throughout playback. On Mobile SDKs, pings are sent automatically; on all other platforms they must be sent manually on the specified interval.

  • Main content: first ping 10 seconds after playback starts, then every 10 seconds thereafter
  • Ad content: every 1 second during ad tracking

Do not include a params object in the ping request body.

Web SDK

Schedule a recurring sendEvent call with eventType: "media.ping". Update playhead to the current playback position on each call:

code language-javascript
alloy("sendEvent", {
  xdm: {
    eventType: "media.ping",
    mediaCollection: {
      sessionID: "{sid}",
      playhead: 10
    }
  }
});
iOS
The Mobile SDK sends ping events automatically. No explicit call is required.
Android
The Mobile SDK sends ping events automatically. No explicit call is required.
Roku

Schedule a recurring sendMediaEvent call with eventType: "media.ping". Update playhead to the current playback position on each call:

code language-brightscript
m.aepSdk.sendMediaEvent({
    "xdm": {
        "eventType": "media.ping",
        "mediaCollection": {
            "playhead": 10
        }
    }
})
Media Edge API

Call the ping endpoint on a timer. Adobe recommends the first ping 10 seconds after main playback starts, every 10 seconds after that, and every 1 second during ad tracking:

code language-sh
curl -X POST "https://edge.adobedc.net/ee/va/v1/ping?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
  "events": [{
    "xdm": {
      "eventType": "media.ping",
      "mediaCollection": {
        "sessionID": "{sid}",
        "playhead": 10
      },
      "timestamp": "YYYY-08-20T22:41:40+00:00"
    }
  }]
}'

Legacy implementation types (Analytics-only)

Media SDK JS 3.x
The Media SDK sends ping events automatically. No explicit call is required.
Chromecast
The Chromecast SDK sends ping events automatically. No explicit call is required.
Media Collection API

Send a ping POST to the events endpoint on a timer. Do not include a params object:

code language-json
{
  "playerTime": { "playhead": 10, "ts": 1699523820000 },
  "eventType": "ping"
}
recommendation-more-help
media-analytics-help