Custom business metadata
Custom dimensions (metadata) in FastPix allows you to extend beyond the predefined dimensions already available on the platform. These additional dimensions enables you to tailor your analytics to specific use cases relevant to your business, providing deeper insights into your data. By using custom dimensions, you can capture unique information about your audience, interactions, and other relevant metrics that are not covered by standard dimensions.
Enabling custom dimensions
Step 1: Access custom dimensions dashboard
Log into your FastPix dashboard and navigate to the "Settings" section. Click on "Custom Dimensions" to view the available options.

Step 2: Enable dimensions
By default, every user, including those on the free plan, is given two custom dimensions. To enable these dimensions, click "Edit" for each custom field and select "Yes".

Step 3: Customize display name and category
Edit the display name to suit your needs and select from eight categories (Device, Player, Video Metadata, Custom, etc.) where you want the new custom field to appear.

PLEASE NOTE
After you upgrade to Growth Plan, you will be able to access 10 custom dimensions. See pricing.
Integrate custom dimensions with SDK
To start collecting data for custom dimensions, you must integrate this data into the SDK during setup. This involves sending custom dimension data alongside other metadata. Once this step is completed, FastPix will begin receiving data for these custom dimensions.
import loadShakaPlayer from "@fastpix/data-shakaplayer";
import shaka from "shaka-player"; // Import Shaka Player
// Initialize player setup
const initTime = loadShakaPlayer.utilityMethods.now(); // Captures the exact timestamp of player initialization
const videoElement = document.getElementById("video-player"); // Select the HTML5 video element for Shaka Player
const player = new shaka.Player(videoElement); // Create a Shaka Player instance bound to the video element
// Define user-passable player metadata
const playerMetadata = {
workspace_id: "WORKSPACE_KEY", // Mandatory field for FastPix integration, replace with your actual workspace key
player_name: "PLAYER_NAME", // A unique identifier for this player instance (e.g., "MyVideoPlayer1")
player_init_time: initTime, // The timestamp when the player was initialized, useful for analytics
video_title: "Test Content", // Title of the video being played (replace with the actual title of your video)
video_id: "video1234", // 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 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
// Additional metadata
};
// Configure FastPix data integration
const fastPixShakaIntegration = loadShakaPlayer(
player, // The Shaka Player instance managing playback
{
debug: false, // Optional flag; set to true to enable debug logs for troubleshooting
data: playerMetadata,
},
shaka, // Pass the imported Shaka Player instance for proper integration
);
// Load the video content
const videoUrl =
"https://stream.fastpix.io/027a90e4-f5e2-433d-81e5-b99ee864c3f6.m3u8"; // Replace with your video manifest URL
player
.load(videoUrl) // Load the video manifest URL into the Shaka Player
.then(() => {
// Successfully loaded the manifest; FastPix will now begin tracking playback data
console.log("Video manifest loaded successfully.");
})
.catch((error) => {
// Handle errors that occur while loading the video manifest
fastPixShakaIntegration.handleLoadError(error); // Notify FastPix of the error
console.error("Error loading video manifest:", error); // Log the error for debugging
});
Visualize data from custom dimensions
After setting up and integrating custom dimensions, you can visualize the data in several ways:
- View detail page: Custom dimension data can be viewed on the detail page, providing a clear overview of how these dimensions impact your analytics.

- Filter and advanced filter sections: Custom dimensions can also be used in the filter and advanced filter sections. This allows you to slice and dice your data across different metrics, providing a more detailed understanding of your audience and their behaviors.


Updated 3 days ago