October 2017
Intermediate to advanced
370 pages
8h 57m
English
The amp-analytics component has built-in configurations for many vendors so that you don't need to manually configure all the details. You can specify a vendor by adding the type="VENDOR_NAME" attribute for a supported vendor. A list of supported vendors can be found here: ampproject.org/docs/guides/analytics/analytics-vendors.
Of course, Google Analytics, being one of the most widely used analytics solutions, has a built-in configuration. We can rewrite the amp-pixel pageview tracking example we saw earlier with amp-analytics built-in configuration like this (/ch10/ga.html):
<amp-analytics type="googleanalytics" id="ga1"> <script type="application/json"> { "vars": { "account": "UA-XXXXX-Y" }, "triggers": ...Read now
Unlock full access