Marketing campaign management

 

Foreword

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

Tagging

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:
https://www.site.com/?at_medium=email&at_campaign=new_offer...
  • If the link points to a file with no variable transmitted:
https://www.site.com/index.php?at_medium=email&at_campaign=new_offer...
  • If the link leads to a file with a transmitted variable:

https://www.site.com/index.php?other_variable=2&at_medium=email&at_campaign=new_offer...

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

 

Campaign format

ParameterDescriptionDetailFormat / Example
at_medium
(obligatoire)
Campaign mediumExpected value:
at_medium=mymediumvalue
at_campaign
(obligatoire)
Name of the campaignExpected value:
at_campaign=mycampaign
at_*Customized properties of your campaignAny querystring parameter starting with at_ will be considered a campaign parameter, and will be translated into a src_ property. You may need to create this src_* in your data model.Expected value:
at_creation=myvalue

Full example:

https://www.site.com/?at_medium=mymedium&at_campaign=mycampaign&at_myproperty=myvalue&at_myotherproperty=myothervalue

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:

PropertyTypeExample
at_creationStringat_creation=Main
at_variantStringat_variant=Blue
at_formatStringat_format=440x300
at_typeStringat_type=Direct
 

Email opening measurement

In order to track email opening with Piano Analytics tagging, it is mandatory to build raw event, embedded in emails inside an <img> tag.

Event name: email.display.offsite

Example:

// Raw event
https://<collection-domain>/event?s=<site-id>&events=[{"name":"email.display.offsite","data":{"src_medium":"email","src_campaign":"email campaign"}}]

// Embedded
<img src="https://<collection-domain>/event?s=<site-id>&events=%5B%7B%22name%22%3A%22email.display.offsite%22%2C%22data%22%3A%7B%22src_medium%22%3A%22email%22%2C%22src_campaign%22%3A%22email%20campaign%22%7D%7D%5D">
 

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();
tag.events.send('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.

The forced source is taken into account from the next day. The real-time functionalities (Data Query granular exports, or Data Flow) are still based on the classic source detection.

 

Consistency between AS2 Tagging and Piano Analytics Tagging

If you tag with both “AS2 Tagging” and “Piano Analytics Tagging” methods and you need to keep the same medium during your transition, please use AS2 medium codes (see AS2 article), combined with a Data Manager rule. More information available in our Help Center.

Last update: 04/04/2022