{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/3149","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/3149/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/3149/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/3149/events","html_url":"https://github.com/ampproject/amphtml/issues/3149","id":153636511,"number":3149,"title":"Feature request: intersection triggers for amp-analytics.","user":{"login":"jpettitt","id":524856,"avatar_url":"https://avatars.githubusercontent.com/u/524856?v=3","gravatar_id":"","url":"https://api.github.com/users/jpettitt","html_url":"https://github.com/jpettitt","followers_url":"https://api.github.com/users/jpettitt/followers","following_url":"https://api.github.com/users/jpettitt/following{/other_user}","gists_url":"https://api.github.com/users/jpettitt/gists{/gist_id}","starred_url":"https://api.github.com/users/jpettitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpettitt/subscriptions","organizations_url":"https://api.github.com/users/jpettitt/orgs","repos_url":"https://api.github.com/users/jpettitt/repos","events_url":"https://api.github.com/users/jpettitt/events{/privacy}","received_events_url":"https://api.github.com/users/jpettitt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ampproject/amphtml/labels/Related%20to:%20Analytics","name":"Related to: Analytics","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-08T05:26:45Z","updated_at":"2016-05-08T16:26:42Z","closed_at":null,"body":"We'd like to be able to track if users read to the bottom of article text and what % of users go beyond that.  The current `amp-analytics` model of using scroll %'s as triggers doesn't give the needed info.  (it's not practical to know what % of the page every article represents on every screen geometry).\r\n\r\nWe'd like to be able to have intersection triggers such that we could specify a dom object and have an analytics trigger fire when it comes into or leaves the viewport.  I'd just fake this with an iframe but AMP makes this hard due to the restrictions on analytics iframes, in particular the fact they are removed automatically.\r\n\r\nAdding this feature would also make it possible to track ad viewability independent of the iframe containing the ad.  For those using multiple ad platforms this would be very helpful.\r\n\r\nAny chance of getting it added to `amp-analytics`?  "},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/217730927","html_url":"https://github.com/ampproject/amphtml/issues/3149#issuecomment-217730927","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/3149","id":217730927,"user":{"login":"avimehta","id":179359,"avatar_url":"https://avatars.githubusercontent.com/u/179359?v=3","gravatar_id":"","url":"https://api.github.com/users/avimehta","html_url":"https://github.com/avimehta","followers_url":"https://api.github.com/users/avimehta/followers","following_url":"https://api.github.com/users/avimehta/following{/other_user}","gists_url":"https://api.github.com/users/avimehta/gists{/gist_id}","starred_url":"https://api.github.com/users/avimehta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avimehta/subscriptions","organizations_url":"https://api.github.com/users/avimehta/orgs","repos_url":"https://api.github.com/users/avimehta/repos","events_url":"https://api.github.com/users/avimehta/events{/privacy}","received_events_url":"https://api.github.com/users/avimehta/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T16:26:42Z","updated_at":"2016-05-08T16:26:42Z","body":"/cc @rudygalfi \r\n\r\n@jpettitt Does scrolled past ~90% of the page not convey similar state? I know it is not as accurate. cc'ing Rudy to figure out priority. "}}