Marketing campaigns

 

Foreword

Before starting implementation of the Campaigns plugin, please make sure you have initialised the AT Internet JavaScript Tracker and selected the plugin from within the Tag Composer interface.

 

Principle

The Campaigns plugin allows you to tag different types of campaigns (ad, affiliate, sponsored links, email marketing).

 

Plugin setup

The plugin must be set up from within the Tag Composer interface. Five parameters must be entered:

  • domainAttribution: linking measurement to a domain or a site number (true: current domain, false: site number; true by default).
  • Lifetime: length of time that data from an ad campaign is conserved (30 days by default).
  • visitLifetime: visit length in minutes (30 min by default).
  • redirectionLifetime: length of time that data on a redirection page is conserved (30 sec by default).
  • lastPersistence: priority of the prior attribution (true: first, false: last; false by default).
 

Tagging

The Campaigns plugin treats data relative to marketing campaigns in an automatic manner when a page tag is used.

var tag = new ATInternet.Tracker.Tag();
tag.page.set({
	name:'pageName',
	chapter1:'chap1',
	chapter2:'chap2',
	chapter3:'chap3',
	level2:'123',
	customObject: {
		param1: 'val1',
		param2: 'val2'
	}
});
tag.dispatch();

The collected information is added to page hits.

 

Measuring links

If your measurement is based on first-party cookies, it is NECESSARY to use the DIRECT METHOD (with ‘xtor’ in the URL) described below.

 

Direct method

This method considers all URLs containing ‘xtor’ as a click.

The ‘xtor’ is the campaign ID. Each campaign created has an associated ID that must be transmitted in the URL leading to your site.

The contents of the ‘xtor’ variable must be communicated in the destination URL following the format ‘xtor=A-B’ where A is the prefix defining the source, and B is the campaign ID.

Add the ‘xtor’ variable to links leading to your site:

  • If the link leads to the root of the site or of a directory:
http://www.site.com/#xtor=...
  • If the link leads to a file without a transmitted variable:

http://www.site.com/index.php#xtor=...
  • If the link leads to a file with a transmitted variable:

http://www.site.com/index.php?other_variable=2#xtor=...

Use of the # allows you to avoid having ‘xtor’ variables indexed in search engines.
If you use a tool that does not support the ‘#’ symbol, you should replace it with ‘?’ (or ‘&’, based on the variable’s position).

 

Structure of xtor variables

If you wish to simplify the tagging of your links without having to know the significance of each field, try the interface available in our marketplace. Please note that this interface has been created by our community and can be improved, so feel free to send us your feedback!

  1. Tagging an ad campaign

    The format of the campaign ID in cases of ads must respect the following rules:

    Mandatory

    – A (source): prefix AD
    – B: campaign ID value (given by AT Internet)

    Optional:

    – C: creative (in the format [label] or id[label]).
    – D: variation (in the format [label] or id[label]).
    – E: format (based on the IDs given by AT Internet and placed between []. You may also specify any other format of your choice by using the following nomenclature: ‘[name]’. Example: You can either enter a name: [button], or a size: [120×40]).
    – F: site (specifying the URL in the format [url]).
    – G: general position on the entire site (based on IDs given by AT Internet and placed between []).
    – H: details of the position on the page.

    Example

    xtor = AD-3030-[ad_version7]-[without_text]-[468]-[www.site.com]-[GT]-[top_page]

    In order to avoid adblocking, you can replace “AD” prefix with any other value (except if you are using automatic campaigns declaration)

    Here we take the example of an ad involving version 7 (creative ‘ad_version7?) with a banner without text (variation ‘without_text’) in the format 468×60. This ad is run on the site www.site.com, in general rotation (‘GT’) and mostly at the top of the page (‘top_page’).

    • The names/labels entered between brackets ([ ]) must be entered as page names: without special characters (accents, spaces or other), except for the dash -, which can’t be used.
    • If [xxxxx] and id[xxxxx] are encountered, they are considered as 2 different elements (even if the label is identical).
    • If the same ID occurs with 2 different labels (for example 23[creative] and 23[creatives]), only the first label will be saved and associated with the ID.
    • The values of A, B, C (and possibly E, F, G and H) must be the same between link measurements and impression measurements.
    • variant D property can 't be used without creation C. You must indeed define a creative name before adding variant.
  2. Tagging an affiliate campaign

    The format of the campaign ID in cases of affiliate campaigns must respect the following rules:

    Mandatory

    – A (source): prefix AL
    – B: campaign ID value (in the format [label] or id[label])

    Optional:

    – C: affiliate type (in the format [label] or id[label]).
    – D: affiliate ID (based on the digital format or id[label]).
    – E: affiliate ad format (based on predefined IDs. You may also specify any other format of your choice by using the following nomenclature: ‘[name]’. Example: You can either enter a name: [button], or a size: [120×40]).
    – F: creative ID (in the format [label] or id[label])
    – G: variation (in the format [label] or id[label])
    – C1*: custom variable to be declared in the interface (in the format id[label]).
    – C2*: custom variable to be declared in the interface (in the format id[label]).
    – C3*: custom variable to be declared in the interface (in the format id[label]).
    * not available in the Analytics Suite, should you need to study these please get back to the support

    • affiliate ID D property can 't be used without affiliate type C. You must indeed define an affiliate type before adding affiliate ID.
  3. Tagging a sponsored link campaign

    The format of the campaign ID in cases of sponsored links must respect the following rules:

    Mandatory:

    – A (source): prefix SEC
    – B: campaign ID value (given by AT Internet)

    Optional:

    – C: platform ID (only if your campaign is distinct for each platform)
    – D: ad group (in the format [label] or id[label]).
    – E: ad variation (in the format [label] or id[label]). By entering exactly [{creative}] in Google, Google will place a unique variation ID enabling the linking of results during data imports from Google. Variation E depends on an announcement group D, it will not be taken into account if this group is wrong or missing.
    – F: ‘S’ or ‘C’ according to whether it comes from search results (‘S’ for Search) or ads on content/display networks (‘C’ for Content).
    – G: the exact keyword bought. By entering exactly [{keyword}] for a campaign in Google, Google will automatically place the exact keyword bought (which may slightly differ from the keyword entered). The principle is similar for Yahoo ([{YSMKEY}]).

  4. Tagging an email marketing campaign

    In the case of email marketing, the campaign ID format must respect the following rules:

    Mandatory:

    – A (source): prefix EREC (Acquisition), EPR (Retention) or ES (Promotion)
    – B: campaign ID value
    – C: email blast ID in the format [label] or id[label].

    Optional:

    – D: Email date in short format: YYYYMMDD
    – E: link ID in the format ‘[label]’ (added by you, based on the link). Please only add if you would like the precise detail of user clicks.
    Click specification depends on the customer’s preference: each link, or only the main areas.
    – F: List of contacts with contact ID in the format id@list (for example, 1435@1 for contact 1435 on list 1).

  5. Tagging a custom source marketing

    In the case of custom source marketing, the campaign ID format must respect the following rules:

    Mandatory:

    – A (source): prefix CSx (provided by AT Internet) ; x must be replaced by the source type ID
    – B: campaign ID value

    Optional:

    – C: custom variable (in the format id[label] or id or [label])
    – D: custom variable (in the format id[label] or id or [label])
    – E: custom variable (in the format id[label] or id or [label])
    – F: custom variable (in the format id[label] or id or [label])

    Example

    xtor = CS1-2[pay_less]-10[Products]-11[brands]
 

Measuring banners

Measuring banner display requires the addition of the URL parameter &type=ad.

Insert the code to call the transparent 1×1 pixel. This only works if the banner relies on a code using either JavaScript or an iframe.

JavaScript example

var img = new Image();
var dt = new Date();
img.src = 'http://logxxxx.xxxx/hit.xiti?xts=xxxx&xto=A-B-C-D-E-F-G-H&type=ad&hl=' + dt.getHours() + 'x' + dt.getMinutes() + 'x' + dt.getSeconds();

It’s necessary to enter 4 pieces of information specific to your site:

    • Your log number (logxxxx): the one indicated in your standard web code (global configuration variable ‘log’ or ‘logSSL’).
    • xts: site number.
    • xto: contains all variables defining your banner (see detail below).
    • type: ad (in the case of an ad banner).
    • url: in the case of the redirection method, you must also enter the URL toward which you want the redirect to point.

If you use an adserver tool (OAS, DART, Smart, Adverline, etc.), please contact us for adapted code to implement (to avoid bypassing the tool already in place).

 

Measuring email opens

&type=email to be added to the URL.

Image example

<img src="http://logxxxx.xxxx/hit.xiti?xts=xxxx&xto=A-B-C-D-E-F&type=email" />
 

Force campaign via tagging code

It is possible to override the marketing campaign thanks to the tracking code, by adding the propety forcedCampaign to the Tracker’s context:

var config = {};
var context = {
    forcedCampaign: 'AD-25568'
};
var tag = new ATInternet.Tracker.Tag(config, context);
 

Appendix

You may specify the format of a banner.

These IDs are:

  • 468: traditional format 468×60
  • sky320: skyscraper format 160×320
  • sky600: skyscraper format 160×600
  • rect180: rectangle format 180×150
  • rect300: rectangle format 300×250
  • rect336: rectangle format 336×280
  • wide: wide banner format (728×90)
  • vert240: vertical banner format 120×240
  • vert600: vertical banner format 120×600)
  • square: square banner format (250×250)
  • popup: pop-up format
  • popund: pop-under format
  • 16-9: 16/9 aspect ratio format (320×180)
  • Inter: interstitial format (800×600)
  • maxwid: Maxi leaderboard format (985×110)
  • intext: intext format
  • 0: other

You may specify any other format of your choice by using the following nomenclature: ‘[name]’.
Example: You can enter either a name: [button], or a size: [120×40].

You may also specify the general placement according to the following IDs:

  • GT: General rotation (GT=General Turnover)
  • HP: Home Page (only on the home page)
  • PHP: Pre-Home Page
  • 0: other

We offer a tool to create your marketing campaign links: https://developers.atinternet-solutions.com/ATInternetCampaignCreator/xtor/

Last update: 20/02/2023