pulsar-analytics
v32.0.0
Published
Player agnostic Twitch video analytics implementation
Downloads
3
Readme
Pulsar-Analytics
Player agnostic analytics implementation of Twitch video metrics.
Supported Events
- Minute Watched
- Video Play
- Buffer Empty
- Buffer Refill
- Video Error
- Video Ended
This package will attach primitive player information, it is up to the consumer
to attach higher level environment, user, and content specific tracking fields.
See src/events
for the full implementation details.
Usage
yarn add pulsar-analytics
import { subscribeVideoAnalytics } from 'pulsar-analytics';
// Calling this will cleanup any listeners that were created
const unSubscribeVideoAnalytics = subscribeVideoAnalytics({
backend: 'native',
onTrackingEvent: (playerEvent) => {
/*...*/
},
timeSinceLoadStart: Date.now(),
video: videoElement,
});