AMP (Accelerated Mobile Pages) is an open source project that lets you build web pages for static content that renders quickly. This feature is ideal for publishers who want to create mobile-optimized content once, and have it load instantly everywhere
To implement analytics tracking, we can utility
amp-analytics element tag for capturing analytics data from an AMP document
amp-analytics element is used to measure activity on an AMP document. The details concerning what is measured and how that data is sent to an analytics server is specified in a JSON configuration object. It comes pre-configured to support many analytics vendors out of the box.
For example, the following
amp-analytics element is configured to send a request to https://codingrepo.com/analytics when the document is first loaded, and each time an tag is clicked:
"eventLabel": "clicked on a link"
To add Adobe Analytics support, The value
adobeanalytics has to be added to the
type attribute as below
<amp-analytics type="adobeanalytics"> ... </amp-analytics>
There are two solutions to implement Adoble Analytics tracking with the
- Using the
adobeanalyticstracking template to construct the Analytics request directly from within the AMP
- Using the
adobeanalytics_nativeConfigtracking template which uses an iframe containing the AppMeasurement code hosted on your own site
The following table gives you an idea of the pros and cons of each approach.
|Visitor/visit counts (in existing report suite)||High inflation||Minimal inflation|
|Using a separate report suite||Recommended||Not necessary|
|New vs. return visitors||Not supported||Supported|
|Visitor ID service||Not supported||Supported|
|Video & link tracking||Partial support||Not yet supported|
|Difficulty of implementation||Somewhat difficult||Relatively easy|
|Marketing Cloud integrations||Not supported||Supported with caveats|
Notes: If you need click tracking and don’t mind visitors being counted as entirely new visitors separate from your site, use the
adobeanalytics tracking template, with our recommendation that you put the data into a separate report suite. If you need the Marketing Cloud ID service, do not want visitor or visit inflation, and are okay with only firing Analytics on page load, using the
adobeanalytics_nativeConfig solution will be recomended.