amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Scrolling does not contribute to engaged time on mobile devices

Open britice opened this issue 10 years ago • 6 comments

PR https://github.com/ampproject/amphtml/pull/1818 was intended to capture overall engagement with articles by users across any viewing platform. One action which should contribute to a measure of user engagement is the 'scroll' event.

A scroll event listener is being registered by the Activity service in an attempt to include that activity in the engaged time measurement. However, in testing in mobile devices since the feature was released, scrolling in the device does not contribute to engaged time.

britice avatar Feb 23 '16 15:02 britice

I think I figured it out already. The scroll event listener is being registered on document.documentElement rather than on the document. I'll need to modify how this is being set up.

britice avatar Feb 23 '16 15:02 britice

@britice use viewer.onScroll. That will give you scroll events independent of our various platform specific scrolling implementations.

cramforce avatar Feb 23 '16 16:02 cramforce

Oh perfect.

britice avatar Feb 23 '16 16:02 britice

@cramforce, did you mean viewport.onScroll instead of viewer.onScroll? I don't see that method available on the Viewer class.

Or were you suggesting to use viewer.onViewportEvent?

britice avatar Feb 23 '16 18:02 britice

Sorry, viewport is correct.

On Tue, Feb 23, 2016 at 10:10 AM, Brian Tice [email protected] wrote:

@cramforce https://github.com/cramforce, did you mean viewport.onScroll instead of viewer.onScroll? I don't see that method available on the Viewer class.

Or were you suggesting to use viewer.onViewportEvent?

— Reply to this email directly or view it on GitHub https://github.com/ampproject/amphtml/issues/2226#issuecomment-187822511 .

cramforce avatar Feb 23 '16 18:02 cramforce

Closing, as this looks like it's resolved, but @britice, please feel free to reopen if there are any outstanding issues/questions!

ericlindley-g avatar Feb 27 '16 00:02 ericlindley-g