Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to catch scroll event for an Instant Articles page?

Is it possible to catch scroll event for a page when a user sees a particular content piece?

We need to send analytics requests when user see images on Instant Articles page

like image 204
cylinder.y Avatar asked Mar 13 '17 13:03

cylinder.y


1 Answers

You can use FB.Canvas.getPageInfo (more documentation at http://developers.facebook.com/docs/reference/javascript/FB.Canvas.getPageInfo/)

I don't think this method allows you to "catch it" per se but there is a way for you to poll it using setInterval which should allow you to detect when the position of the page has changed.

like image 147
bananibau5 Avatar answered Nov 16 '22 07:11

bananibau5