Variables (iframe)

Toma
Toma
  • Updated

With Adform custom variables you can pass additional information such as sales, order IDs, product names, or other custom values via the tracking point together with information collected by default (such as browser type, operating system, or screen size).

The data is sent to Adform servers and later can be used for retargeting or analytics purposes.

Order and Product Level Variables

Variables can be passed either on order (single value) or product (multiple value) levels.

Order Level

Order level variables are used for values unique per each activation and are used when a single value needs to be passed at a time, such as the order ID or total sales amount of a purchase. These variables are defined in the scope of itm object:

window.adf&&adf.ClickTrack(this,{trackingID},'Example tracking point',{sales:'insert sales value here',orderid:'insert order id value here',currency:'insert currency value here'});

Product Level

Product level variables are used to pass information about each individual item, such as product cart details. These variables are defined in the itms array, which is added to the order object.

window.adf&&adf.ClickTrack(this,{trackingID},'Example tracking point',{'itms':[{productname:'insert product name value here',productid:'insert product id value here',productsales:'insert product sales value here'}]});

If there are several items which need to be passed, that can be done by creating an additional item in the array:

itms: [{
    productname: 'insert product 1 name value here',
    productid: 'insert product 1 id value here',
    productsales: 'insert product 1 sales value here',
},{
    productname: 'insert product 2 name value here',
    productid: 'insert product 2 id value here',
    productsales: 'insert product 2 sales value here',
},{
    productname: 'insert product 3 name value here',
    productid: 'insert product 3 id value here',
    productsales: 'insert product 3 sales value here',
}]

Custom Variables

Variables in Adform come with predefined names (such as Sales, Order ID) and also custom ones, which can be renamed in Adform platform.

These variables can pass values at the order or product level:

  • svn1 and svn2: used to pass a real number (integer) only, which can be later used to create custom reports.

  • sv(x): can pass any kind of string, and they can vary up to var10. These variables can only be used at the order level.

  • var(x): (such as var1, var2) can pass any kind of string, and they can vary up to var10. These variables can only be used at the order level.

Supported variables:

Name

Parameter value

Used in

Value

Report type

Order level variables

Sales

sl

Order

Real

Custom reports

Order ID

id

Order

String

Data exports

Currency

cur

Order

String

Custom reports

Gender

gen

Order

String

Custom reports

Age group

age

Order

String

Custom reports

Country

cntr

Order

String

Custom reports

Product level variables

Product name

pnm

Product

String

Custom reports

Product sales

psl

Product

Real

Custom reports

Product ID

pid

Product

String

Custom reports

Product category

pgr

Product

String

Custom reports

Product category ID(DCO)

cid

Product

String

N/A

Product count

pcnt

Product

Integer

Custom reports

Weight (DCO weight in rotation)

weight

Product

Integer

N/A

Step (DCO view, basket or purchase event)

step

Product

Integer

N/A

Custom variables

var1 … var10

var1var10

Order

String

Data exports

sv1 … sv7

sv1sv7

Both

String

Custom reports

sv8 … sv89

sv8sv89

Both

String

Data exports

svn1 and svn2

svn1 and svn2

Both

Real

Custom reports

Check Implementation

After implementing the tracking point on a page, you can check if it was activated using Adform site tracking testing browser extension. You can download it for a Chrome browser from the web store.

Alternatively, you can check network requests via the browser’s developer tools:

Click

Successful activation will result in two network requests, which are:

  1. Tracking point library

  2. A tracking point request, which contains the tracking setup ID, tracking point name, and other information sent

Javascript variables are encoded in Base 64 function before sending the tracking point request to Adform servers where the data is decoded.

For additional information, contact the Site Tracking team (site-tracking@adform.com).

Was this article helpful?

/
How we can make it better?

Thank you for your feedback!