@playkit-js/plugin-taxonomy-analytics
v1.0.1-canary.0-0436798
Published
[](https://app.travis-ci.com/kaltura/playkit-js-plugin-taxonomy-analytics) [ integration with advanced taxonomy data collection, dynamic template evaluation, and seamless media tracking capabilities.
🚀 Key Features
- 🔄 V2 Legacy Compatibility - Seamless migration path from legacy V2 player implementation
- 📊 Advanced Analytics Tracking - Full Adobe Analytics/Omniture SiteCatalyst integration
- 🎯 Dynamic Template Evaluation - Flexible variable substitution with async data loading
- 📈 Comprehensive Event Tracking - Media events, milestones, and custom analytics events
- 🔧 Modern TypeScript Architecture - Full type safety and modern development practices
- 🏗️ Independent Operation - No dependency on legacy plugins or configurations
📋 Table of Contents
🛠️ KMC Configuration
This plugin is configured and deployed through the Kaltura Management Console (KMC). It does not require direct npm installation for production use.
For development purposes only:
npm install @playkit-js/plugin-taxonomy-analytics🔄 V2 to V7 Migration
⚠️ Important Note: This plugin is completely independent and does NOT require the previously built playkit-js-omniture-on-page plugin to be loaded or configured.
Template Variable Migration Guide
The V7 plugin uses an improved template system with better organization and async data loading:
| V2 Legacy Template | V7 Modern Template | Description |
| -------------------------------- | ------------------------------------ | -------------------------- |
| {mediaProxy.entry.id} | {source.id} | Media entry ID |
| {mediaProxy.entry.duration} | {source.duration} | Media duration |
| {mediaProxy.entry.name} | {source.metadata.name} | Media name/title |
| {mediaProxy.entry.referenceId} | {taxonomy.entry.referenceId} | Entry reference ID |
| {mediaProxy.entry.rootEntryId} | {taxonomy.entry.rootEntryId} | Root entry ID |
| {trDataLoad.flashVersion} | {taxonomy.props.flashVersion} | none |
| {trDataLoad.location} | {taxonomy.props.location} | User location data |
| {trDataLoad.playerName} | {taxonomy.props.playerName} | Player name/version |
| {trDataLoad.content} | {taxonomy.props.content} | |
| {trDataLoad.screen} | {taxonomy.props.screen} | Screen/display information |
| {trDataLoad.eud} | {taxonomy.config.eud} | |
| {trDataLoad.preferedFlavorBR} | {taxonomy.config.preferedFlavorBR} | |
| {trDataLoad.riuid} | {taxonomy.config.riuid} | |
| {trDataLoad.jobrole} | {taxonomy.config.jobrole} | |
| {trDataLoad.pn} | {taxonomy.config.pn} | |
| {trDataLoad.wtype} | {taxonomy.config.wtype} | |
| {trDataLoad.euid} | {taxonomy.config.euid} | |
| {trDataLoad.instanceId} | {taxonomy.config.instanceId} | |
| {trDataLoad.t1uid} | {taxonomy.config.t1uid} | |
| {trDataLoad.publishDate} | {taxonomy.entry.publishDate} | Publication date |
| {trDataLoad.categoryRefId} | {taxonomy.entry.categoryRefId} | Category reference ID |
| {trDataLoad.categoryName} | {taxonomy.entry.categoryName} | Category name |
| {trDataLoad.companyId} | {taxonomy.entry.companyId} | Company identifier |
| {trDataLoad.companyName} | {taxonomy.entry.companyName} | Company name |
| {trDataLoad.kalturaChannelId} | {taxonomy.entry.kalturaChannelId} | Kaltura channel ID |
| {trDataLoad.kalturaCompanyId} | {taxonomy.entry.kalturaCompanyId} | Kaltura company ID |
| {trDataLoad.referenceId} | {taxonomy.entry.referenceId} | Reference ID |
| {mediaProxy.preferedFlavorBR} | {taxonomy.config.preferedFlavorBR} | |
Key Improvements in V7
- 🔧 Enhanced Configuration Experience - More intuitive and flexible configuration options
- ⚡ Async Template Loading - Dynamic data loading with better performance
- 🎯 Better Error Handling - Comprehensive logging and error management
- 📱 Modern Architecture - Built with TypeScript and modern development practices
⚙️ Configuration
Complete Configuration Example
{
'taxonomy-analytics': {
additionalEvarsAndProps: {
eVar69: '{taxonomy.entry.rootEntryId}',
eVar68: '{source.duration}',
eVar67: '{taxonomy.entry.publishDate}',
eVar66: '{taxonomy.entry.referenceId}',
eVar65: '{taxonomy.entry.categoryRefId}',
eVar64: '{taxonomy.entry.categoryName}',
eVar63: '{taxonomy.entry.companyId}',
eVar62: '{taxonomy.entry.companyName}',
eVar13: '{taxonomy.config.eud}',
eVar14: '{taxonomy.config.preferedFlavorBR}',
eVar25: '{taxonomy.props.flashVersion}',
eVar26: '{taxonomy.props.location}',
eVar27: '{taxonomy.config.riuid}',
eVar28: '{taxonomy.config.jobrole}',
eVar32: '{taxonomy.props.playerName}',
eVar43: '{taxonomy.config.pn}',
eVar45: '{taxonomy.config.wtype}',
eVar48: '{taxonomy.config.euid}',
eVar63: '{source.id}',
eVar64: '{taxonomy.entry.kalturaChannelId}',
eVar65: '{taxonomy.entry.kalturaCompanyId}',
eVar66: '{taxonomy.config.instanceId}',
eVar67: '{taxonomy.props.content}',
eVar78: '{taxonomy.config.t1uid}',
prop4: '{taxonomy.entry.referenceId}',
prop6: '{taxonomy.entry.categoryRefId}',
prop7: '{taxonomy.entry.categoryName}',
prop9: '{taxonomy.entry.companyId}',
prop10: '{taxonomy.entry.companyName}',
prop14: '{taxonomy.props.screen}',
prop29: '{taxonomy.config.riuid}',
},
customEvents: {
error: {
eventId: 'event51',
vars: {
eVar50: '',
},
},
},
mediaName: '{source.metadata.name} - {taxonomy.entry.referenceId}',
mid: '1_entry_id',
sCodeUrl: 'https://your_domain/s_code_prod.js',
// Optional configuration
cid: '',
instanceId: '',
monitorInterval: 0, // 0 disables interval-based tracking
overridePlayerName: '',
playerName: '',
responseProfileSystemName: 'RESPONSE_PROFILE',
sCodeVarName: 's',
theme: 'default',
trackMilestones: '25,50,75',
},
}🏷️ Template Variables
Source Variables
{source.id}- Media entry ID{source.duration}- Media duration in seconds{source.metadata.name}- Media title/name{source.metadata.description}- Media description
Taxonomy Entry Variables
{taxonomy.entry.rootEntryId}- Root entry identifier{taxonomy.entry.referenceId}- Reference ID{taxonomy.entry.publishDate}- Publication date{taxonomy.entry.categoryRefId}- Category reference ID{taxonomy.entry.categoryName}- Category name{taxonomy.entry.companyId}- Company identifier{taxonomy.entry.companyName}- Company name{taxonomy.entry.kalturaChannelId}- Kaltura channel ID{taxonomy.entry.kalturaCompanyId}- Kaltura company ID
Taxonomy Properties
{taxonomy.props.flashVersion}- Flash version information{taxonomy.props.location}- User location data{taxonomy.props.playerName}- Player name/version{taxonomy.props.content}- Content classification{taxonomy.props.screen}- Screen/display information
Configuration Variables
These values are taken directly from the module configuration and can be used in templates:
{taxonomy.config.eud}{taxonomy.config.preferedFlavorBR}{taxonomy.config.riuid}{taxonomy.config.jobrole}{taxonomy.config.pn}{taxonomy.config.wtype}{taxonomy.config.euid}{taxonomy.config.instanceId}{taxonomy.config.t1uid}
🔧 Development
Prerequisites
- Node.js 22+ and Yarn
- TypeScript knowledge
- Familiarity with Kaltura Player V7
Development Setup
# Clone the repository
git clone https://github.com/Kaltura-PS/playkit-js-taxonomy-analytics.git
cd playkit-js-taxonomy-analytics
# Install dependencies
yarn install
# Start development server
yarn serveDevelopment Workflow
🔄 Start Development Server
yarn serveThe dev server runs on
http://localhost:8000with live reload.🧪 Test Your Changes
- Open
http://localhost:8000/demo/for single entry demo - Open
http://localhost:8000/demo/playlist.htmlfor playlist demo
- Open
