Accelerated Mobile Pages (AMP)

 

Foreword

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>.

 

Prerequisite

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)
 

Standard tagging

Certain parameters must be filled in to enable the correct sending of information.

First of all, the basic parameters:

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
 

Available requests

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.

 

pageview

The “pageview” request lets you send pageview information. Here’s an example of a call:

No parameters need to be filled in here. Page information must be filled in in the tag’s basic variables.

 

click

The “click” request lets you send click information. Here’s an example of a call:

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
 

Full tag

Here’s an example of a full tag, enabling measurement of page loading, as well as of all clicks present on the page.

 

Tagging specific information

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.

 

Examples

 

Custom variable

This will generate a page hit with the following information :

  • Site custom variable 1 with the value “25” (x1=25)
  • Site custom variable 2 with the value “Text” (x2=[Text])
  • Page custom variable 1 with the value “Label” (f1=[Label])
 

Identified visitors

This will generate a page hit with the following identified visitor information :

  • Visitor id “5588964” (an=5588964)
  • Visitor category “2” (ac=2)
 

Custom object

This will generate a page hit with the following custom object :

{
"articleId": "123456"
}

Last update: 28/08/2017