• websites



amp-pixel is a lightweight mechanism for measuring pageviews. It provides functionality similar to amp-analytics, but only includes a single event (views), and offers fewer transport mechanisms and variables.


amp-pixel is a built-in component and does not require loading an extension.

Basic usage

The amp-pixel issues a simple GET request to the given URL and ignores the result. This is a fast way to track pageviews.

<amp-pixel src=""

Variable substitution

The variables noted in amp-var-substitutions will be interpolated in the URL as a way to capture some meaningful data.

<amp-pixel src=""

Referrer Policy

The optional referrerpolicy attribute allows you to strip the 'Referrer' header in the outbound HTTP request. Other values of referrerpolicy that are valid for other tags (e.g. amp-img) are not available for amp-pixel.

<amp-pixel src=""
Need further explanation?


Go to Stack Overflow
An unexplained feature?


Edit sample on GitHub