From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Variables

Introduction

Adform custom variables enable to pass additional information such as sales, order ids, product names or other custom values via the tracking point calls together with information collected by default - such as browser type, operating system or screen size.
The data is being 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) and/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 made. Such variables are defined in the scope of 'itm' object:

Example of the tracking code with sales, order id and currency variables:

https://track.adform.net/Serving/TrackPoint/?pm={trackingID}&ADFPageName=Example%20tracking%20point&ADFdivider=|&itm={sl:'insert sales value here',id:'insert order id value here',cur:'insert currency value here'}&rdir=<insert redirect URL here>
Product level

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

Example of the tracking code with product name, id, and sales variables:

https://track.adform.net/Serving/TrackPoint/?pm={trackingID}&ADFPageName=Example tracking point&ADFdivider=|&itm={'itms':[{pnm:'insert product name value here',psl:'insert product sales value here',pid:'insert product id value here'}]}&rdir=<insert redirect URL here>

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

'itms':[{pnm:'insert product 1 name value here',psl:'insert product 1 sales value here',pid:'insert product 1 id value here'},{pnm:'insert product 2 name value here',psl:'insert product 2 sales value here',pid:'insert product 2 id value here'},{pnm:'insert product 3 name value here',psl:'insert product 3 sales value here',pid:'insert product 3 id value here'}]

Example tracking code with order and product level variables added:

https://track.adform.net/Serving/TrackPoint/?pm={trackingID}&ADFPageName=Example%20tracking%20point&ADFdivider=|&itm={sl:'insert sales value here',id:'insert order id value here','itms':[{pgr:'insert product 1 category name value here',pnm:'insert product 1 name value here'},{pgr:'insert product 2 category name value here',pnm:'insert product 2 name value here'}]}&rdir=<insert redirect URL here>
Custom variables

Variables in Adform come with predefined names, like (sales, ordered etc.) and also custom ones, which are to be renamed in Adform platform.
These variables can be passed either in the Order, or Product levels.

svn1 and svn2

svn1 and svn2 variables are used to pass a real number (integer) only, which can be later used for custom analytics report creating.

sv(x)

These variables (such as SV1, SV2) support any kind of string to be passed, and they can vary up to SV96.

var(x)

var(x) (such as var1, var2) support any kind of string to be passed, and they can vary up to var10. There variables can only be used in order level.

Example part of tracking code with custom variables:

https://track.adform.net/Serving/TrackPoint/?pm={trackingID}&ADFPageName=Example tracking point&ADFdivider=|&itm={sv1:'insert sv1 value here',svn1:'insert svn1 value here',var1:'insert var1 value here','itms':[{sv2:'insert sv2 value here',svn2:'insert svn2 value here',var2:'insert var 2 value here'}]}&rdir=<insert redirect URL here>

 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 var1 … var10 Order String Data exports
sv1 … sv7 sv1 … sv7 Both String Custom reports
sv8 … sv89 sv8 … sv89 Both String Data exports

svn1 and svn2 svn1 and svn2 Both Real Custom reports

Implementation check

After variables have been implemented it can be confirmed if it is successfully passed to Adform using the Adform site tracking testing browser extension - it is available to be downloaded for Chrome browser here.

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

 Redirect

Successful activation will result in a tracking point network 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:

Example Request URL:

https://track.adform.net/Serving/TrackPoint/?pm={trackingId}&ADFPageName=Example%20tracking%20point&ADFdivider=%7C&ord=896447548360&Set1=en-US%7Cen-US%7C1600x900%7C24&itm=eyJzbCI6IjYwIiwiaWQiOiIxMjM0NSIsIml0bXMiOlt7InBubSI6IlByb2R1Y3QgQSIsInBzbCI6IjQwIn0seyJwbm0iOiJQcm9kdWN0IEIiLCJwc2wiOiIyMCJ9XX0&loc=http%3A%2F%2Fsite.adform.com%2F

The variables are sent in the 'itm' property:

eyJzbCI6IjYwIiwiaWQiOiIxMjM0NSIsIml0bXMiOlt7InBubSI6IlByb2R1Y3QgQSIsInBzbCI6IjQwIn0seyJwbm0iOiJQcm9kdWN0IEIiLCJwc2wiOiIyMCJ9XX0

Decoding this value in Base 64 outputs in the variables and values which were passed:

{"sl":"60","id":"12345","itms":[{"pnm":"Product A","psl":"40"},{"pnm":"Product B","psl":"20"}]}

For additional information please contact site tracking team at site-tracking@adform.com.