ampproject / ampproject/amphtml

[amp-next-page] [amp-access] AMP Reader ID Changes on Scrolling through to amp-next-page in amp viewer

Open
#31,238 4 comments 0 reactions 0 assignees View on GitHub
Component: amp-next-page Stale Type: Bug WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

## What's the issue?
The [AMP Reader ID](https://amp.dev/documentation/components/amp-access/#amp-reader-id) (used to meter users via amp-access) is changing on scrolling into amp-next-page in an amp _viewer_ (but not on publisher origin). This means the views are metered separately, so users are able to read additional content.

(This was observed using amp-next-page 0.1 and 1.0 in the implementation.)

## How do we reproduce the issue?
1. Go to https://www.google.com/amp/s/www.forbes.com/sites/rachelsandler/2020/10/30/facebook-temporarily-stops-recommending-political-groups-to-combat-election-misinformation/amp/ in mobile emulator with network tab open in Devtools.
2. Scroll through and into the second article.
3. Search for executeAmp in the network tab. You should see two records. Compare the reader_id query params for each of them. They are distinct even though they are for the same session / amp-access scope. (If you open another tab and go to, for example, https://www.google.com/amp/s/www.forbes.com/sites/nicholasreimann/2020/10/29/zeta-was-strongest-hurricane-to-ever-hit-new-orleans-and-could-cause-an-election-day-mess/amp and scroll through, you will see that the reader id of the first article will correspond to that of the first article of the previous stream you looked at and the same for the second article)

## What browsers are affected?
Viewers only, Chrome, Pixel 2

## Which AMP version is affected?
2011070101001

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the amp-next-page and amp-access behavior in a mobile Chrome emulator using the supplied Forbes URL, then inspect executeAmp requests in DevTools. Compare reader_id values while scrolling into the second article and trace the viewer-specific path; done means the same session and amp-access scope retain the expected reader ID across articles.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.