Skip to main content

Event Schema

Implementation

Best Practices

Overview

Consistent video event tracking across CTV platforms enables unified audience analytics and cross-platform cohort building. This guide covers the standard video event schema and implementation patterns for all supported platforms.

Video Event Schema

Permutive uses a consistent video event schema across all CTV platforms:

Core Events

Standard Video Properties

Use these properties consistently across events for unified analytics:
Property Naming: The schema uses snake_case property names, nested under a top-level video parent. Each platform’s SDK or addon handles input differently — see Property Mapping below for the per-platform details.

Completion Event Properties

Additional properties on VideoCompletion (aggregated from VideoEngagement data accumulated during playback):

Ad Event Properties

Properties for video ad events (VideoAdView, VideoAdCompletion, VideoAdClicked):

Ad Completion Event Properties

Additional properties on VideoAdCompletion:

Platform Implementation

Platforms: Samsung Tizen, LG WebOS, HbbTVUse the CTV addon for automatic event tracking:
Automatic Events:
  • Videoview - tracked when addon is initialized
  • VideoCompletion - tracked when .stop() is called
See Web CTV documentation for full details.

Engagement Tracking

How Engagement Works

Engagement time measures how long a user actively watches content:
  1. Start - When play() is called, engagement timer starts
  2. Pause - When pause() is called, timer pauses
  3. Resume - When play() is called again, timer resumes
  4. Complete - When stop() is called, total engagement is recorded

Buffering Considerations

Buffering should pause engagement tracking:

Seeking/Scrubbing

When users seek to a new position:

Ad Break Handling

Pre-roll Ads

Track ads before main content:

Mid-roll Ads

Pause main content tracking during ads:

Post-roll Ads

Track ads after main content completes:

Best Practices

  • Set duration accurately - Provide video duration in milliseconds when initializing
  • Sync with player state - Call play()/pause() when the player state changes
  • Always call stop() - Ensure stop() is called when video ends or user exits
  • Handle buffering - Pause tracking during buffering states
  • Track all ad events - Capture ad views and completions for ad analytics
  • Use consistent properties - Follow the standard schema across all platforms
  • Include video metadata - Richer metadata enables more precise cohort building
  • Generate unique view IDs - Create new view IDs per content session (Roku)

Cross-Platform Consistency

For unified analytics across platforms, ensure:

Event Name Consistency

Property Mapping

Each platform exposes a different publisher input shape, but all platforms ultimately produce events that conform to the schema above (properties nested under a top-level video parent).
Work with Technical Services to configure a unified event schema across all platforms.

Troubleshooting

Problem: Engaged time doesn’t match expected values.Solutions:
  • Ensure play() is called only when video is actually playing
  • Call pause() during buffering and paused states
  • Verify stop() is called when video ends
  • Check that ad breaks pause the main content tracker
Problem: VideoCompletion event shows 0% or null completion.Solutions:
  • Provide duration when creating the tracker/addon
  • Ensure duration is in the correct unit (milliseconds for most SDKs)
  • Wait for video metadata to load before creating tracker
Problem: Events don’t show in Permutive analytics.Solutions:
  • Verify SDK is initialized with correct credentials
  • Check browser/device console for errors
  • Ensure events match your workspace schema
  • Wait 5-10 minutes for events to process
Problem: Ad events aren’t associated with video content.Solutions:
  • Track ads using the same addon/tracker instance
  • On Roku, use the same view_id for content and ads
  • Ensure ad events fire during the video session

CTV Overview

Platform selection guide

Web CTV

Tizen, WebOS, HbbTV integration

tvOS

tvOS integration

Android TV

Android TV integration

Roku

Roku integration

iOS Video Tracking

Detailed iOS MediaTracker docs