ampproject / ampproject/amphtml
Amp-next-page not getting the refeererDocument from the Host Page
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
When giving a pageview from an amp-analytics tag inside a amp-next-page, the documentReferrer should be the hostPage, but it's empty.
## How do we reproduce the issue?
Here you have an example: https://output.jsbin.com/gujosag. Try it in mobile ans let the amp-next-page build. You'll see two calls in the network to ?ping. In ref you have the ${documentReferrer] variable, it's empty on the pageviw of the amp-next-page where it should be the host page.
## What browsers are affected?
All.
## Which AMP version is affected?
All.
Contributor guide
Research direction
Start with the linked JSBin reproduction and inspect the amp-next-page and amp-analytics implementations to trace documentReferrer during the second pageview. Reproduce the two ?ping network calls on mobile and verify that the amp-next-page request reports the host page as its referrer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100