New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kaltura-ott/tvpil-analytics

Package Overview
Dependencies
Maintainers
1
Versions
843
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaltura-ott/tvpil-analytics

## OPC

  • 1.55.1
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

k-ux-analytics

OPC

Analytics library allows to send predefined events to Kaltura DTLK. This library uses the following technologies and conventions:

  • TypeScript language (superset of Javascript).
  • Error reported with TSLint and Codelyzer.
  • Analytics abstraction library

Installation

This module is distributed via npm, which is bundled with node and should be installed as one of your project's dependencies.

npm i @kaltura-ott/tvpil-analytics

Usage

import { KDataLake, KUxAnalytics, KUxBaseEventData, UserLoginSuccessEventArgs } from '@kaltura-ott/tvpil-analytics';

// create base event data
const baseEventData: KUxBaseEventData = {
  groupId: 1234,
  userId: 2,
  udid: 'UDID',
  ks: 'user or anonymous ks',
};

// Initialize and configure KUxAnalytics
// At least one plugin should be used
KUxAnalytics.configure(
  {
    app: 'K1',
    version: '1.0.0',
    plugins: [new KDataLake({ endpointUrl: 'URL_TO_DTLK' })],
  },
  baseEventData,
);

// Create an instance of event
const loginSuccess = new UserLoginSuccessEventArgs('someUserName');

// Use created instance of KUxAnalytics to send events without callback
KUxAnalytics.getInstance().send(loginSuccess);

// Sending an event with callback
KUxAnalytics.getInstance().send(loginSuccess, () => {
  console.log('do this after track');
});

// Update KUxAnalytics base data
// example for a use case, after successful login/logout
KUxAnalytics.getInstance().updateBaseData({ userId: 12 });

Analytics Errors

Playback errors
CodeMessage
1000recordingId is mandatory when mediaType equals RECORDING
1001epgId is mandatory when mediaType equals LIVE
1002languageID missing for action LANG
1003subtitleID missing for action SUB_CHANGE
1004errorID missing for action CONCURRENCY_CN
1005audioTrackID missing for action AUDIO
Device action errors
CodeMessage
2000initiatedBy param missing
2001swVersion param missing
2002custom param missing
Configuration errors
CodeMessage
5000endpointUrl missing in plugin config

Available Events

All available events can be found here

Available Plugins

All supported plugins and its DMS configuration can be found here

FAQs

Package last updated on 03 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc