Marketing campaign management



Before you begin implementing the Campaigns plugin, please make sure you have initialized the AT Internet Tracker JavaScript and selected the plugin from the Tag Composer interface. These campaign settings are compatible with all versions of SmartTag JavaScript since version 5.17.0.


Plugin settings

The plugin must be configured from the Tag Composer interface. Several options are available:

  • domainAttribution: link the measure to a domain or a site number (true: current domain, false: site number ; true by default).
  • lifetime: data retention period of an advertising campaign in days (30 days by default).
  • visitLifetime: duration of the visit in minutes (30 min by default).
  • redirectionLifetime: data retention time on a redirection page in seconds (30 sec by default).
  • lastPersistence: remanence priority (true: first, false: last; false by default).
  • enableUTMTracking: automatic recovery of UTM campaign settings (true by default).


The Campaigns plugin processes marketing campaign data automatically when an event marker is used.


Link tagging

The content of the campaign parameters must be communicated in the destination URL according to the format at_medium=email&at_campaign=new_offer where at_medium is the source label and at_campaign is the campaign label. These parameters are both mandatory for the campaign to be taken into account in your analyses.

Add campaign parameters to the links pointing to your site:

  • If the link points to the root of the site or a directory:
  • If the link points to a file with no variable transmitted:
  • If the link leads to a file with a transmitted variable:

The character “?” (or “&”, depending on the position of the variable) can be replaced by the character “#” .


Campaign format

ParameterDescriptionDetailFormat / Example
Campaign mediumExpected value:
Name of the campaignExpected value:
at_*Customized properties of your campaignAny querystring parameter starting with at_ will be considered a campaign parameter, and will be translated into a src_ propertyExpected value:

Full example:

This will result in the following properties:

  • src_medium : mymedium
  • src_campaign : mycampaign
  • src_myproperty : myvalue
  • src_myotherproperty : myothervalue

You can also associate standard data model properties to your campaigns:


Forcing the campaign from the tag

It is possible to force the campaign with campaign settings directly from the tagging, by adding the forcedCampaignV2 property to the Tracker context:

var config = {};
var context = {
  forcedCampaignV2: {
    medium: 'email',
    campaign: 'new offer',
    creation: 'Main',
    variant: 'Blue',
    format: '440x300',
    type: 'Direct',
    custom_prop: 'my value'   // src_custom_prop must be declared in your data model
var tag = new ATInternet.Tracker.Tag(config, context);

Force visit marketing source

It is possible to force the marketing source of a visit even if we’ve already retrieved another one on past events.
For this, you have to set the src_force property (boolean) to true:

var tag = new ATInternet.Tracker.Tag();'page.display',
    'page': 'page name',
    'page_chapter1': 'chapter 1',
    'page_chapter2': 'chapter 2',
    'page_chapter3': 'chapter 3',
    'src_medium': 'email',
    'src_campaign': 'launching',
    'src_force': true

If several sources are forced during a visit, the last one filled in will be the one kept.

Last update: 07/09/2021