Tracking AMP Pages

In addition to standard pixel tracking, SegMetrics support AMP Page Tracking.

In order to use AMP tracking, simply add the two following code snippets to your AMP pages.

Amp-Analytics Component

Once you have an AMP page up and running, include the amp-analytics component before the closing </head> tag:

<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>

SegMetrics Pixel

Include the following SegMetrics analytics pixel below the amp-analytics in your page, replacing YOUR_INTEGRATION_ID with your Integration Id:
<amp-analytics type="application/json" config="https://tag.segmetrics.io/analytics.amp.config.json">
<script type="application/json">
{
  "vars": {
    "integration": YOUR_INTEGRATION_ID
  }
}
</script>
</amp-analytics>

Still need help? Contact Us Contact Us