Tapemetric

Getting started

Event schema

The complete JSON contract for every event Tapemetric accepts.

Full payload example

json
{
  "event_type": "play_start",
  "ts": "2026-04-23T18:30:12.456Z",
  "anonymous_id": "a8f3c2d0-1e5b-4a9c-8d4e-7f2a1b3c4d5e",
  "user_id": "user_12345",
  "session_id": "sess_a1b2c3d4e5f6g7h8",

  "content_id": "aashiqana_s04e12",
  "content_type": "series",
  "content_title": "Aashiqana · S4 E12",
  "season": 4,
  "episode": 12,

  "position_sec": 0,
  "duration_sec": 2640,
  "bitrate_kbps": 4500,
  "buffer_count": 0,
  "buffer_duration_ms": 0,

  "plan": "svod",
  "revenue_inr": null,

  "context": {
    "device_type": "tv",
    "os": "Tizen",
    "browser": "Tizen Browser",
    "app_version": "4.12.0",
    "user_agent": "Mozilla/5.0 (SMART-TV; LINUX; Tizen 6.0) AppleWebKit/..."
  },

  "properties": {
    "drm": "widevine",
    "quality_preset": "auto"
  }
}

Required fields

FieldTypeNotes
event_typestringMax 48 chars. See event types.
tsISO 8601 UTCClient clock — server re-times within ±30s tolerance.
anonymous_idstringUUID. Persisted by the SDK in localStorage.
session_idstringRotates after 30 min of inactivity.

Identity

FieldTypeNotes
user_idstring?Set after identify(). Max 128 chars.

Content

FieldTypeNotes
content_idstring?Stable URL-safe slug. Max 128 chars.
content_typeenumseries · film · live · short
content_titlestring?Human-readable. Max 255 chars.
seasonint?For series only.
episodeint?For series only.

Playback

FieldTypeNotes
position_secfloat?Current playhead position.
duration_secfloat?Total content length.
bitrate_kbpsint?Current ABR rung.
buffer_countint?Number of rebuffers since play start.
buffer_duration_msint?Cumulative rebuffer time in ms.

Monetization

FieldTypeNotes
planenumsvod · avod · tvod · free
revenue_inrfloat?For purchase events.

Context (auto-collected)

The SDK fills these automatically. Override them on server-to-server calls if needed.

FieldTypeNotes
context.device_typeenumtv · mobile · web · tablet · stb
context.osstring?Parsed from user agent.
context.browserstring?Parsed from user agent.
context.app_versionstring?Your app version.
context.user_agentstring?Full UA string.

Free-form properties

Pass any custom JSON object in the properties field. Supported on every event type. Keys are lowercased and snake_cased server-side; nested objects are preserved but not indexed for querying.