Identified visitors

 

Foreword

Before starting to implement the identified visitors plugin, please make sure you have initialised the AT Internet JavaScript Tracker and selected the plugin from the Tag Composer interface.

If different values are recorded in the same visit, only the first one will be taken into account

 

Principle

Identified visitors are those you can recognise following an authentication (sign-up, subscription, login…). These visitors can be grouped into categories in order to give you a more overall view with your analyses.

 

Plugin setup

The identified visitors plugin must be set up within the Tag Composer interface. Two parameters must be indicated:

  • Site domain: linking measurements to a domain or a site number (true: current site, false: site number; true by default).
  • Lifetime: Length of time that identified visitor data is conserved (in days, 182 by default).
 

Tagging

The Tracker has the methods “identifiedVisitor.set()” and “identifiedVisitor.unset()” to create or remove an identified visitor.

The “identifiedVisitor.set()” method takes as a parameter an object whose properties are as follows:

  • id: visitor ID (numerical or textual).
  • category: category to which the visitor belongs

In order to use textual ID, an option is required. Please contact our support centre if you intend to use it.

Sending information on an identified visitor requires the presence of a “tag.page.set()” page tag.

 

Tagging examples

  1. Tagging a page with a numerical visitor ID
    var tag = new ATInternet.Tracker.Tag();
    tag.page.set({
        name: 'myPage'
    });
    tag.identifiedVisitor.set({
        id: 123456
    });
    tag.dispatch();
  2. Tagging a page with a numerical visitor ID and a category
    var tag = new ATInternet.Tracker.Tag();
    tag.page.set({
        name: 'myPage'
    });
    tag.identifiedVisitor.set({
        id: 123456,
        category:'21'
    });
    tag.dispatch();
  3. Tagging a page with a textual visitor ID
    var tag = new ATInternet.Tracker.Tag();
    tag.page.set({
        name: 'myPage'
    });
    tag.identifiedVisitor.set({
        id: 'abcd123'
    });
    tag.dispatch();
  4. Tagging a page with a textual visitor ID and a category
    var tag = new ATInternet.Tracker.Tag();
    tag.page.set({
        name: 'myPage'
    });
    tag.identifiedVisitor.set({
        id: 'abcd123',
        category: '21'
    });
    tag.dispatch();
  5. To disable visitor identification (e.g when a user logs out)
    var tag = new ATInternet.Tracker.Tag();
    tag.page.set({
        name: 'myPage'
    });
    tag.identifiedVisitor.unset();
    tag.dispatch();
Last update: 27/02/2019