Skip to content

[Analytics] send requests to domain derived from variable #19759

@tingyiwei

Description

@tingyiwei

What's the issue?

Instead of sending AMP analytics requests to a fixed domain, we'd like to send to domain derived from am Analytics variable.
requests: {
endpoint: ${someVariable}
}
The issue is ${someVariable} always return an encoded string, while here an decoded string is needed.

How do we reproduce the issue?

<script type="application/json"> { "requests": { "pageview": "${documentReferrer}" }, "triggers": { "pageload": { "on": "visible", "request": "pageview" } } } </script>

In this case, https%3A%2F%2Fwww.example.com is returned instead of https://www.example.com

What browsers are affected?

ALL

Which AMP version is affected?

ALL

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions