Amp-next-page not getting the refeererDocument from the Host Page
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.
@eduardcotmrf In the link you provided, the amp-analytics element in the amp-next-page's child page contains this config:
{
"requests": {
"event": "https://amp.dev/documentation/examples/components/amp-analytics/ping?user=2e0194f8-8b5d-4fea-9354-1fa085c78518&account=ampdev&event=${eventId}&n=${n}"
},
"triggers": {
"renderStart": {
"on": "ad-render-end",
"request": "event",
"vars": {
"eventId": "pageviewFromAmpDoc",
"n": "${timestamp}"
}
}
}
}
Which does not have a ${documentReferrer} variable, so it's hard to test.
However, even when I do test it out locally, the document referrer works on both the host page and the child page.
I'm curious, is this happening with a viewer context?
@eduardcotmrf can u respond to the comment above?
sorry yes, the example didnt have the attribute.
Here I have reproduce it again: https://output.jsbin.com/pamarakogi
The parameter ref from both calls to ping have the documentReferrer. The second one, the one coming from the amp-next page should have the host page on it but it's blank.
Remember to test it simulating mobile in order to let the amp-next-page work fine in the example.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.