-
Notifications
You must be signed in to change notification settings - Fork 184
Add analytics #5
Comments
duration of average playback would be good as well (not just 'finished' event). Otherwise LGTM |
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? |
You could do this in a window.onbeforeunload handler, right?
Could we have median playback time per video rather than (or as well as) average playback? A few other possible stats: |
@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? |
I was thinking more https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon |
I love how the related WebWorker version https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/sendBeacon |
@johnpallett Any more?
The text was updated successfully, but these errors were encountered: