Skip to content
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 configuration option for the trigger "timer" in amp-analytics to support video analytics #2802

Closed
ThomasPaq opened this issue Apr 4, 2016 · 5 comments

Comments

@ThomasPaq
Copy link

With amp-analytics we can use the trigger "timer" to fire a request on a regular time interval. Currently the only options are interval and maxTimerLength.
Is it possible to add two options to link the begin and the end of the timer with events.

What we would like :

  • the timer begins when the video starts
  • the timer ends when the video stops
@jridgewell
Copy link
Contributor

This could be wrapped up into #1654, no?

@dvoytenko
Copy link
Contributor

/cc @rudygalfi @avimehta

@avimehta
Copy link
Contributor

avimehta commented Apr 4, 2016

I think timer is the wrong place to do this. The correct behavior will be to have video events directly defined by the extension and amp-analytics supporting "videoStart" and videoEnd" etc triggers. As @jridgewell said, lets focus on #1654 getting added to AMP.

@ThomasPaq
Copy link
Author

Hello,
This behavior will allow us to make video analytics in Médiamétrie. Maybe it's the wrong place to do this ...
I will try to explain you how our video analytics works :

  1. for each standart player events (play, pause, stop) we send a request (we call theses requests 'state requests')
  2. there is something important for us, what we call 'session'. A 'session' starts with the first play of the video and ends with the stop of the video. If there is a new play after a stop it will be a new session
  3. when the session starts we have a 'timer' which will send request each minute (we call these requests 'polling requests")
  4. the information that we need for the requests are : the video duration, the playhead position, the playhead position set in the previous hit, a session id (unchanged during the session) and a timer number (something like global variable requestCount but which reset for new session).
    What I think is :
  • for 1) Add video analytics for amp-video to amp-analytics #1654 will provide the solution
  • for 2) maybe we can add the 'session' notion in the amp-video component (with a session id wich reset itself when there is a stop) ?
  • for 3) I thought that I had to create a new issue, this one, because 'timer' trigger seems near to what we call 'polling requests'
  • for 4) I do not have any idea from know. I just hope that we can get the video duration, the video position and the session id from the player. For the position set in the previous hit and the timer number curently I do not have idea.
    Let me know what do you think about that. Maybe I am in the wrong direction

@rudygalfi rudygalfi changed the title Add configuration option for the trigger "timer" in amp-analytics Add configuration option for the trigger "timer" in amp-analytics to support video analytics Apr 5, 2016
@adelinamart adelinamart modified the milestones: New FRs, Backlog Bugs Feb 11, 2017
@rudygalfi rudygalfi modified the milestones: Prioritized FRs, New FRs Apr 5, 2017
@rudygalfi
Copy link
Contributor

We have a more proper design in #9902 that covers most or all of what's proposed here. Could you turn your attention to #9902 and give us additional feedback based on that design?

FYI @aghassemi closing this out in favor #9902.

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

No branches or pull requests

6 participants