How-to

Track delivery events

Send useful analytics events without coupling telemetry to image rendering.

Use the SDK event client for application-level events such as gallery views or completed interactions. Keep event ingestion independent from the image request path.

await client.track({
  event: 'gallery_view',
  galleryId: 'gallery_id',
  assetId: 'asset_id',
});

The client adds an occurrence time when one is not provided. Send analytics after the UI has rendered or use a non-blocking request path; a telemetry failure should not prevent an image from displaying.