October 2017
Intermediate to advanced
370 pages
8h 57m
English
Configuration can be loaded from a remote URL with the config attribute. For instance, you can load a Google Tag Manager configuration with the following:
<amp-analytics config="https://www.googletagmanager.com/amp.json?id=GTM-XXXXXX>m.url=SOURCE_URL" data-credentials="include"> <script type="application/json"> { "vars": { "foo": "bar" } } </script></amp-analytics>
The remote configuration can be combined with an inline configuration object too, as in the preceding example. Note that a remote configuration will:
Read now
Unlock full access