Use passable dimensions

User Passable Dimensions (metadata) refers to the customizable data fields that users can provide during the initialization of a video playback session. This metadata enhances the tracking and analysis of viewer interactions by allowing the inclusion of specific identifiers and contextual information related to the video content, viewer, and playback environment.



To ensure that users benefit from meaningful data during video playback sessions, it is essential for developers to pass relevant metadata values during SDK integration. Please follow the links to know how to integrate in web, android and iOS.

While our system automatically detects certain metadata in the background, there are situations where specific values may not be captured. In these cases, user input from the front end becomes crucial.


Types of dimensions

1. Required fields

workspace_id is a crucial metadata that ensures the data flows to the intended environment.

In order to get the workspace_key, please click here.


ParameterUnitDefinition
workspace_idUnique IDA unique identifier for the workspace where video content and associated data are stored. This ID helps in organizing and managing content across different projects or teams within the platform.

PLEASE NOTE
Passing metadata such as video_id, video_title, and viewer_id alongside workspace_id is crucial for providing a comprehensive context to video views. This practice significantly enhances the ability to identify who is watching which content, thereby improving analytics and user engagement.


2. Overridable dimensions

This includes parameters like browser_name, browser_version,  video_cdn, os_name, os_version, device_manufacturer, device_type, device_model, and device_name. Although these can be detected automatically, there are instances where detection may fail. When developers pass this information, it enhances segmentation and allows for more meaningful analysis.


ParameterUnitDefinition
video_cdnTextThe Content Delivery Network used to deliver the video stream, providing insights into delivery performance and reliability. Understanding CDN performance can help optimize streaming quality and reduce buffering times. <br> _Eg., Cloudflare, Akamai_
browser_nameTextThe browser used to access the video content; useful for understanding viewer environment.
browser_versionVersionThe specific version of the browser being used, aiding in compatibility analysis.
os_nameTextThe operating system on which the viewer is accessing the content; important for performance insights.
os_versionVersionThe version of the operating system being used; helps identify compatibility issues.
device_manufacturerTextThe manufacturer of the device used to access the content; useful for segmentation and analysis.
device_typeTextThe type of device (e.g., mobile, desktop, tablet) being used; important for understanding user behavior.
device_modelTextThe specific model of the device being used; aids in detailed analysis of performance across different devices.
device_nameTextThe name of the device being used; useful for identifying trends in device usage among viewers.

3. Optional configurable dimensions

These fields can be included at the developer's discretion and may encompass various attributes related to the playback environment.

ParameterUnitDefinition
viewer_idUnique IDAn optional unique identifier for the viewer accessing the content, useful for personalized analytics.
video_idTextA unique identifier for the specific video being viewed, used to correlate metrics with the video content.
video_titleTextThe title of the video content being viewed, providing context for analytics and reporting.
page_contextTextContextual information about the page where the video is embedded or viewed, helping to understand user behavior more effectively. <br> _Eg., watchpage, iframe_
player_init_timeMilliseconds since EpochThe time taken to initialize the video player, measured in milliseconds; crucial for assessing startup performance.
sub_property_idTextAn identifier for any sub-properties associated with this view, useful for tracking specific segments of content.
video_content_typeTextThe type of content being viewed (e.g., movie, series, documentary), important for categorizing analytics effectively.
video_drm_typeTextThe type of Digital Rights Management applied to the video content, which can influence accessibility and playback options.
video_durationMillisecondsThe total duration of the video content in seconds; valuable for calculating engagement metrics.
video_encoding_variantTextThe specific encoding variant used for delivering the video stream; important for assessing quality and compatibility.
video_language_codeTextThe language code representing the language in which the video is presented; aids in localization efforts.
video_producerTextThe name of the producer associated with this video content; useful for branding and attribution analysis.
video_seriesTextThe series name associated with the video if applicable; helps organize related content for viewers.
video_stream_typeTextThe type of stream from which the video is sourced (e.g., live, on-demand); important for understanding delivery methods.
video_variant_nameTextThe name of a specific variant of the video being played; useful for tracking different versions or formats.
video_variant_idTextA unique identifier for a specific variant of the video; essential for detailed analytics on playback options.
view_session_idUnique IDA unique identifier that links a specific viewing session to upstream services like CDN or origin logs.
experiment_nameTextThe name of any experiment linked to this viewing session, aiding in A/B testing and feature validation.
player_nameTextThe name of the video player being used, which can assist in identifying compatibility and performance issues.
player_versionVersionThe version of the video player software being utilized, essential for ensuring compatibility with features and content.

4. Custom dimensions

This feature allows you to define your own dimensions for data segmentation and experimentation purposes. It is an enterprise-level feature that becomes visible only when enabled from the frontend dashboard.

Get more information on how to use Custom dimensions .


ParameterUnitDefinition
custom_1-custom_10TextOptional fields that allow users to pass additional metadata tailored to filtering and analysis based on specific needs or business logic.

Example: Passing dimensions into Video Data SDK

Below example provides you the insight for configuring user-passable metadata into video data SDK for HLS.js (web). For configuring HLS.js into your application refer this guide.


// Define  passable  dimensions for tracking
const customDimensions = {
  workspace_id: "WORKSPACE_KEY", // Unique key to identify your workspace (replace with your actual workspace key)
  player_name: "Main Video Player", // A custom name or identifier for this video player instance
  player_init_time: initializationTime, // Timestamp of when the player was initialized (useful for tracking performance metrics)
  video_title: "Test Content", // Title of the video being played (replace with the actual title of your video)
  video_id: "f01a98s76t90p88i67x", // A unique identifier for the video (replace with your actual video ID for tracking purposes)
  viewer_id: "user12345", // A unique identifier for the viewer (e.g., user ID, session ID, or any other unique value)
  video_content_type: "series", // Type of content being played (e.g., series, movie, etc.)
  video_stream_type: "on-demand", // Type of streaming (e.g., live, on-demand)
  
  // Custom dimension fields for additional business logic
  custom_1: "", // Use this field to pass any additional data needed for your specific business logic
  custom_2: "", // Use this field to pass any additional data needed for your specific business logic

  // Add any additional dimensions here if needed
};

// Pass both `hlsPlayerInstance` and `Hls` to the FastPix tracker for correct tracking
fastpixMetrix.tracker(videoPlayerElement, {
  debug: false, // Set to true to enable debug logs in the console
  hlsjs: hlsPlayerInstance, // Pass the `hlsPlayerInstance` created above
  Hls, // Pass the `Hls` constructor (imported)
  data: customDimensions, // Attach custom metadata for analytics and tracking
});