Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions builtins/amp-pixel.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,32 @@ See the License for the specific language governing permissions and
limitations under the License.
-->

### <a name="amp-pixel"></a> `amp-pixel`
## <a name="amp-pixel"></a> `amp-pixel`

The `amp-pixel` element is meant to be used as a typical tracking pixel - to count page views.
The `amp-pixel` element is meant to be used as a typical tracking pixel to count page views.

#### Behavior
### Behavior

The `amp-pixel` component behaves like a simple tracking pixel `img`. It takes a single URL, but provides variables that can be replaced by the component in the URL string when making the request. See the `src` attribute for more information.

#### Attributes
### Attributes

**src**

A simple URL to send a GET request to when the tracking pixel is loaded.

#### Substitutions
### Substitutions

The `amp-pixel` allows all standard URL variable substitutions.
See [Substitutions Guide](../spec/amp-var-substitutions.md) for more info.
The `amp-pixel` allows all standard URL variable substitutions. See the [Substitutions Guide](../spec/amp-var-substitutions.md) for more information.

For example, this code:

For instance:
```html
<amp-pixel src="https://foo.com/pixel?RANDOM"></amp-pixel>
```
may make a request to something like `https://foo.com/pixel?0.8390278471201` where the RANDOM value is randomly generated upon each impression.

#### Styling
may make a request to something like `https://foo.com/pixel?0.8390278471201`, where the `RANDOM` value is randomly generated upon each impression.

### Styling

`amp-pixel` should not be styled.