Instructions for UniqueTrackingPoints

Embed Size (px)

DESCRIPTION

ddd

Citation preview

  • Instructions for Unique Tracking Points

    User Manual

  • Unique Tracking Points 1

    Last saved: 2013.06.05

    Table of contents:

    Adform Unique Tracking Codes 2

    Instructions for Inserting Tracking Point on the Website 2

    Tracking of Variables 3

    Creating Orders (Items) 3

    Adding Products (Sub-items) 3

    Real number validation rules 4

    Transaction limitations 4

    Tracking Secure Pages 5

    Serving External Tracking Pixels through Adform Tags (Container Tags) 6

    Older Versions 6

  • Unique Tracking Points 2

    Last saved: 2013.06.05

    Adform Unique Tracking Codes The Adform unique tracking code is a webpage specific tracking code, meaning it relates to a

    specific webpage on your website and must therefore only be copy/pasted into one specific

    webpage.

    The Adform unique tracking code utilizes javascript functions, which gathers visitor information

    (e.g. browser type, operating system or screen size) and sends this info along with campaign and

    point id to Adform servers.

    Instructions for Inserting Tracking Point on the Website The Adform unique tracking code must be copied and pasted into the appropriate webpage,

    preferably within the tags and at best immediately before the tag.

    Simply paste the Adform unique tracking code from the file UniqueTrackingPoints.txt into the

    appropriate website page and Adform will begin collecting traffic data immediately.

    Example

    Your pages head content

    var _adftrack = {

    pm: $campaignid,

    id: $pointid,

    };

    (function(){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src='https

    ://track.adform.net/serving/scripts/trackpoint/async/';var x = document.getElementsByTagName('script'

    )[0];x.parentNode.insertBefore(s, x);})();

  • Unique Tracking Points 3

    Last saved: 2013.06.05

    Where $campaignid and $pointid is a unique campaign/point id number generated by the

    Adform system.

    Tracking of Variables

    If specific variables are to be tracked usually on thank-you or confirmation pages, e.g. the sale

    amount, product name, order ID, etc. you have to pass the values from your sites variables to

    predefined Adform variables. If done properly, this information will be passed to Adform servers.

    Creating Orders (Items)

    You can create one order (or one item) per tracking point call. To do this, an object order: {}

    containing all order-related variables must be added to the _adftrack = {} object.

    Example:

    var _adftrack = {

    pm: $campaignid;

    id: $pointid,

    order: {

    sales: '100.70',

    currency: 'GBP',

    basketsize: '2',

    country: 'UK',

    agegroup: '26-35',

    gender: 'F',

    sv1: 'PayPal',

    ...

    sv7: 'DHL',

    svn1: '15.00',

    svn2: '5.00',

    // Variables below are accessible in variable data extracts only

    orderid:'5625566',

    var1: 'A5554',

    ...

    var10: 'Some other data',

    sv8: 'Some more data',

    ...

    sv96: 'Even more data...'

    }

    };

    unique campaign id (mandatory)

    unique point id (mandatory)

    real number

    any valid string

    integer

    any valid string

    any valid string

    any valid string

    any valid string

    any valid string

    any valid string

    real number

    real number

    any valid string

    any valid string

    any valid string

    any valid string

    any valid string

    any valid string

    any valid string

    any valid string

    any valid string

    As you can see from the example above, you can use 14 predefined Report variables, 8 of which are

    only accessible in variable data extracts due to their randomness. You are also allowed to use up to

    101 variables to transfer custom data (of string or real number type).

    Adding Products (Sub-items)

    You can add several products (or several sub-items) per order. To do this, an array itms: [] can be

    added to the order: {} object. Information about each product must be contained within a separate

    comma-separated object. This way you can add more than one product per order (one tracking

    point call).

  • Unique Tracking Points 4

    Last saved: 2013.06.05

    Example:

    var _adftrack = {

    pm: $campaignid,

    id: $pointid,

    order: {

    ... any order-related variables ...

    itms: [{

    categoryname: 'Shoes',

    productid: 'SHOE5569826X',

    productname: 'Black women shoes',

    productcount: '2',

    productsales: '50.35',

    sv1: 'PayPal',

    ...

    sv7: 'DHL',

    svn1: '15.00',

    svn2: '5.00',

    // Variables below are accessible in variable data extracts only

    sv8: 'Some more data',

    ...

    sv89: 'Even more data...'

    },

    {

    ... second product ...

    }]

    }

    });

    unique campaign id (mandatory)

    unique point id (mandatory)

    any valid string

    any valid string

    any valid string

    integer

    real number

    any valid string

    any valid string

    any valid string

    real number

    real number

    any valid string

    any valid string

    any valid string

    As you can see from the example above, you can use 8 predefined Report variables for tracking

    product parameters. You are also allowed to use up to 91 variables to transfer custom data (of

    string or real number type).

    Note: Only integer number type is supported for basketsize and product count variables. Additionally, if float values are sent, it will cause data loss for these 2 variables.

    Real number validation rules

    All real numbers that are passed to Adform functions are validated against the following rules:

    1. Integer part (to the left of the decimal separator) can be up to 13 digits long. Anything

    longer than that is unsupported and will be registered as a 0 (zero).

    2. Decimal part (to the right of the decimal separator) can be up to 4 digits long. If you specify

    more than that, decimal part will be truncated (without rounding) to 4 decimal places.

    3. Digit grouping (e.g. thousand separators) are unsupported

    4. Resulting number should be less than 1000000000000 (1,e+12)

    5. Negative values are supported, with same restrictions as detailed above.

    Transaction limitations

    Maximum URL length of a tracking point is 4000 symbols per single page. Because of the database

    limitation, only first 3000 symbols can be stored (i.e. everything from 3000th symbol will be

    cropped), that means the more Report variables the less data they can carry.

  • Unique Tracking Points 5

    Last saved: 2013.06.05

    Part of a transaction (up to 800 symbols) contains technical information with dynamic length fields

    (e.g. Cpref - referrer URL, which length depends on visited page URL). Other part contains variables

    names, data - which are also dynamic length fields as well as separators. That is why we can give

    only approximate maximum variable lengths:

    Maximum Report variable length is ~3000 symbols, when 1 Report variable is used per page

    (e.g. tracking point).

    Maximum Report variable length is ~13 symbols, when maximum number of Report

    variables (200) are used.

    Note: Special symbols can increase Report variable length, because all special symbols are encoded, e.g. space is replaced by %20, so we have 3 symbols instead of one.

    Tracking Secure Pages The Adform unique tracking code is as standard tailored for secure access. However, if your website

    does not contain any web pages using the HTTPS protocol, you may alter the code to gain a slight

    download improvement. Simply change https to http like below:

    (function(){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src='http:

    //track.adform.net/serving/scripts/trackpoint/async/';var x = document.getElementsByTagName('script')

    [0];x.parentNode.insertBefore(s, x);})();

  • Unique Tracking Points 6

    Last saved: 2013.06.05

    Note: https://track.adform.net/serving/scripts/trackpoint/async/ is designed to be downloaded once from Adform and is then served from the visitor's cache.

    Serving External Tracking Pixels through Adform Tags (Container Tags) If the Adform tracking point should be able to serve external pixels (e.g. for Pay-Per-Lead tracking

    for media and affiliate networks such as Advertising.com), then you dont need to add any variables

    or function calls to tracking point script. Serving external tracking pixels with Adform unique

    tracking points is always available.

    Info: If you have any questions regarding Adform tracking code implementations, please contact

    Adform Traffic Team at [email protected]

    Older Versions Previous version of unique tracking points using adf.track, adf.createOrder({}) or

    adf.addProduct({}) functions is documented here (PDF).