October 2017
Intermediate to advanced
370 pages
8h 57m
English
The requests object contains any URL endpoints for delivering analytics data. In the example, all pageview requests will be sent to the following URL:
https://a.theampbook.com/?url=${canonicalUrl}&title=${title}...
Note that we use ${...} syntax for platform variable substitutions with amp-analytics, instead of the capitalized syntax we used with amp-pixel: ${title} instead of TITLE, for example.
If we wanted to send click requests to a different URL or to configure different URL parameters, we can add another property to the requests object like this:
"requests": { "pageview": "https://a.theampbook.com/?url=${canonicalUrl}&title=${title}&acct=${account}", "click": "https://a.theampbook.com/?url=${canonicalUrl}&clickTarget=${clickTarget}&acct=${account}" ...Read now
Unlock full access