Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Add analytics #5

Open
paullewis opened this issue Feb 8, 2017 · 6 comments
Open

Add analytics #5

paullewis opened this issue Feb 8, 2017 · 6 comments

Comments

@paullewis
Copy link
Contributor

paullewis commented Feb 8, 2017

  • Event for watching a video
  • Event for finishing a video
  • Event for downloading a video for offline
  • Page visit

@johnpallett Any more?

@johnpallett
Copy link

duration of average playback would be good as well (not just 'finished' event). Otherwise LGTM

@WORMSS
Copy link

WORMSS commented Feb 20, 2017

How do you capture "exit of video" and fire a "playback duration" if the webpage is being closed? Would that be a service worker type method?

@samdutton
Copy link

samdutton commented Feb 20, 2017

How do you capture "exit of video" and fire a "playback duration" if the webpage is being closed?

You could do this in a window.onbeforeunload handler, right?

duration of average playback

Could we have median playback time per video rather than (or as well as) average playback?

A few other possible stats:
• Tap/click on a video thumbnail (i.e. for more information, before watching the video).
• Tap/click on play but playback fails (by some measure of 'fail').
• Tap/click on slider (scrub bar).
• Nice to have: record analytics events when the user is offline.

@WORMSS
Copy link

WORMSS commented Feb 20, 2017

@samdutton I didn't think you could call an async function (such as report to analytics) from onbeforeunload and guarantee that it would fully execute?

@paullewis
Copy link
Contributor Author

@WORMSS
Copy link

WORMSS commented Feb 20, 2017

I love how the related WebWorker version https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/sendBeacon
is just a massive load of NOPE for implemented on browsers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants