Variable substitution in AMP
AMP provides a mechanism whereby you can include special variables that will be replaced with actual values at runtime. There's a long list of such variables that can provide information about the client, such as SCREEN_WIDTH and SCREEN_HEIGHT, or about performance, such as PAGE_LOAD_TIME and SERVER_RESPONSE_TIME, among others. There are also miscellaneous variables such as RANDOM, which will be replaced with a random number, and QUERY_PARAM, which can be used to access query string parameters.
You can find out more about the available variables in the AMP specification (github.com/ampproject/amphtml/blob/master/spec/amp-var-substitutions.md).
One variable we are interested in here is CLIENT_ID. When the AMP runtime ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access