AMP tracking
For the following integration to work, you must add the amp-analytics module on the page environment.
Here is an example of the AMP tag:
1
<amp-analytics type="mediarithmics">
2
<script type="application/json">
3
{
4
"vars": {
5
"site_token": <SITE_TOKEN>,
6
"event_name": "amp-test-pageview"
7
},
8
"extraUrlParams": {
9
"prop1": "value1",
10
"prop2": "value2"
11
}
12
}
13
</script>
14
</amp-analytics>
Copied!
Arguments
name
type
description
site_token
string
site_token is the token of the website (required).
event_name
string
event_name is the name of the event (optional, default to '$page_view').
any custom property
string
All custom properties should be added to the extraUrlParams object (prop1, prop2 in the example).
Copy link