-
Notifications
You must be signed in to change notification settings - Fork 0
Accelerated Mobile Pages AMP
Pages in the Accelerated Mobile Pages (AMP) format are optimised for loading on mobile. AT Internet is natively integrated in the project, making it possible for you to use adapted tagging via a dedicated tag, <amp-analytics>.
In order to make it work, please take care of the following points:
- Integrate the amp-analytics extension before AMP
- Use the securised collection server (log)
Certain parameters must be filled in to enable the correct sending of information.
First of all, the basic parameters:
"vars": {
"site": "YOURSITEID",
"log": "YOURSSLLOG",
"domain": ".YOURDOMAINLOG",
"title": "pageChapter::pageTitle",
"level2": "10"
}| Parameter | Definition |
|---|---|
vars.site |
Site number |
vars.log |
Mandatorily secured collection server (SSL) |
vars.domain |
Collection domain |
vars.title |
Name of the loaded page (with chapters) |
vars.level2 |
Level 2 of the loaded page |
vars.pixelPath |
Pixel path for the hit (default hit.xiti). Available only with CDDC. |
We offer two types of requests to call in your triggers; one lets you tag page loads, and the other lets you tag clicks made on the page.
The “pageview” request lets you send pageview information. Here’s an example of a call:
"defaultPageview": {
"on": "visible",
"request": "pageview"
}No parameters need to be filled in here. Page information must be filled in in the tag’s basic variables.
The “click” request lets you send click information. Here’s an example of a call:
"links": {
"on": "click",
"selector": "a",
"request": "click",
"vars": {
"label": "clickChapter::clickLabel",
"level2Click": "12",
"type": "a"
}
}Three parameters are available for this tagging:
| Parameter | Definition |
|---|---|
vars.label |
Click name (with chapters) |
vars.level2Click |
Click level 2 |
vars.type |
Click type. Possible values: – a : action click – n : navigation click – s : exit click – t : download click |
Here’s an example of a full tag, enabling measurement of page loading, as well as of all clicks present on the page.
<amp-analytics type="atinternet" id="atinternet">
<script type="application/json">
{
"vars": {
"site": "YOURSITEID",
"log": "YOURSSLLOG",
"domain": ".YOURDOMAINLOG",
"title": "pageChapter::pageTitle",
"level2": "10"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview"
},
"links": {
"on": "click",
"selector": "a",
"request": "click",
"vars": {
"label": "clickChapter::clickLabel",
"level2Click": "12",
"type": "a"
}
}
}
}
</script>
</amp-analytics>In order to track information not available in the default tag, it is possible to declare additional parameters, named extraUrlParams.
They can be used on all the available triggers. Trigger level extraUrlParams have priority over root ones.
<amp-analytics type="atinternet" id="atinternet">
<script type="application/json">
{
"vars": {
"site": "YOURSITEID",
"log": "YOURSSLLOG",
"domain": ".YOURDOMAINLOG",
"title": "pageChapter::pageTitle",
"level2": "10"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview",
"extraUrlParams": {
"x1": 25,
"x2": "[Text]",
"f1": "[Label]"
}
},
"links": {
"on": "click",
"selector": "a",
"request": "click",
"vars": {
"label": "clickChapter::clickLabel",
"level2Click": "12",
"type": "a"
}
}
}
}
</script>
</amp-analytics>This will generate a page hit with the following information :
- Custom site variable 1 with the value “25” (
x1=25) - Custom site variable 2 with the value “Text” (
x2=[Text]) - Custom page variable 1 with the value “Label” (
f1=[Label])
<amp-analytics type="atinternet" id="atinternet">
<script type="application/json">
{
"vars": {
"site": "YOURSITEID",
"log": "YOURSSLLOG",
"domain": ".YOURDOMAINLOG",
"title": "pageChapter::pageTitle",
"level2": "10"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview",
"extraUrlParams": {
"an": 5588964,
"ac": 2
}
},
"links": {
"on": "click",
"selector": "a",
"request": "click",
"vars": {
"label": "clickChapter::clickLabel",
"level2Click": "12",
"type": "a"
}
}
}
}
</script>
</amp-analytics>This will generate a page hit with the following identified visitor information :
- Visitor id “5588964” (
an=5588964) - Visitor category “2” (
ac=2)
<amp-analytics type="atinternet" id="atinternet">
<script type="application/json">
{
"vars": {
"site": "YOURSITEID",
"log": "YOURSSLLOG",
"domain": ".YOURDOMAINLOG",
"title": "pageChapter::pageTitle",
"level2": "10"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview",
"extraUrlParams": {
"stc": "{\"articleId\":\"123456\"}"
}
},
"links": {
"on": "click",
"selector": "a",
"request": "click",
"vars": {
"label": "clickChapter::clickLabel",
"level2Click": "12",
"type": "a"
}
}
}
}
</script>
</amp-analytics>This will generate a page hit with the following custom object :
{ "articleId": "123456" }
Last update: 05/02/2020
-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android