-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Snowplow Media plugin with APIs to track media events (close #1176) #1177
Conversation
BundleMonFiles added (6)
Total files change +94.92KB 0% Final result: ✅ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gonna have to trust your testing on the state machine aspects in sessionStats and adTracking. 😅
Otherwise mostly looks really good, exciting plugin!
I don't have a lot of experience with the other media plugins to know if this will integrate well, so LGTM if LGT other reviewers.
b74c7b3
to
60e11ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Integrating this with the Vimeo plugin was smooth sailing, great job!
…nd make it configurable
…s unknown event types
3c23017
to
831c308
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Issue #1176
Adds a new plugin for tracking media events using
trackMediaXXX()
functions. The APIs are intended to be media player agnostic and usable for all kinds of video players (in contrast with our other plugins that target YouTube, Vimeo, ...).Tracking API
Simplified example of how one would use the plugin:
Documentation
The documentation is deployed as a preview here:
The draft PR for the docs is here.
Schemas
The plugin makes use of some existing as well as new schemas:
media_player
schema for a context entity that is added to all events and describes the current state of the media player.media_player_session
which holds an ID for all media events from the player and also some statistics about the playback computed on the tracker.media_player_ad
andmedia_player_ad_break
are used to describe the currently played ads.Example app
Probably the easiest way to understand how the data looks like and how it is tracked is through an example app that I have built. The app is currently deployed at this address (this is just temporary, once reviewed I'd like to host it on Github pages for the examples repo so that anyone can inspect it to understand how media tracking works): https://snowplow-media-demo.tomlein.org/media
The app shows a media player and a table with a list of tracked events under it. The table is automatically updated as new events are tracked.
I have created a PR on the examples repository to add this app: snowplow-incubator/snowplow-javascript-tracker-examples#56