Tapemetric

Events

Custom events

Track anything Tapemetric doesn't already know about — watchlists, ratings, shares, profile switches.

Basic shape

Any event type not reserved by Tapemetric is a custom event. Use snake_case names. Keep properties flat where possible — nested objects are stored as JSON but aren’t indexed.

typescript
rd.track({
  eventType: 'watchlist_add',
  content: { contentId: 'mumbai_junction', contentType: 'film' },
  properties: { source: 'detail_page' },
});

Naming convention

  • Use snake_case: rating_submit, not ratingSubmit.
  • Use noun_verb order: profile_switch, not switch_profile.
  • Keep it under 48 chars.
  • Reserved prefix rd_* is for system events — don’t use it.

Property conventions

  • Values that are numbers should stay numbers, not strings.
  • Booleans stay booleans.
  • Currency amounts should be in the base unit (INR, not paise) for consistency.
  • Timestamps in ISO 8601 UTC.

Common custom events

typescript
// Watchlist
rd.track({ eventType: 'watchlist_add', content: { contentId, contentType: 'series' } });
rd.track({ eventType: 'watchlist_remove', content: { contentId, contentType: 'series' } });

// Ratings
rd.track({ eventType: 'rating_submit', content: { contentId, contentType: 'film' }, properties: { stars: 4 } });

// Sharing
rd.track({ eventType: 'share_click', properties: { channel: 'whatsapp', contentId } });

// Profile (multi-profile accounts)
rd.track({ eventType: 'profile_switch', properties: { from: 'profile_1', to: 'profile_2' } });

// Preferences
rd.track({ eventType: 'subtitle_change', properties: { from: 'off', to: 'hi' } });
rd.track({ eventType: 'audio_track_change', properties: { from: 'hi', to: 'en' } });
rd.track({ eventType: 'quality_change', properties: { from: 'auto', to: '1080p' } });

// Download (for offline-capable apps)
rd.track({ eventType: 'download_start', content: { contentId, contentType: 'film' } });
rd.track({ eventType: 'download_complete', content: { contentId, contentType: 'film' }, properties: { size_mb: 1843 } });

// Cast
rd.track({ eventType: 'cast_start', properties: { target: 'chromecast' } });

Querying custom events

Custom events show up in the admin panel’s Events Explorer. Filter by event type and slice by any top-level property via the GROUP BY dropdown.

Don’t fire a custom event type more than ~10,000 times per day per tenant unless you need it for a specific metric. Ingest cost scales with event volume, not cardinality of event types.

High-cardinality properties

Avoid using unbounded strings as properties (e.g. full URLs, raw search queries). These blow up the unique-values count and make the Explorer useless. Instead:

  • Truncate URLs to path only.
  • Hash search queries or bucket by first word.
  • For free-text, use the properties bag but don’t expect to group by it.