Variables (JavaScript)

Solveiga
Solveiga
  • Updated

With Adform variables, you can pass additional information, such as sales, order IDs, product names, or other values, through the tracking point. This data is then sent together with the default information collected, such as browser type, operating system, or screen size.

The data is sent to Adform servers and you can retrieve it to use for retargeting or analytics purposes.

Order and Product Level Variables

You can pass variables either on order level (single value) or product level (multiple values).

Order Level

Use order-level variables for values that are unique to each activation and pass a single value at a time, such as the order ID or the total sales amount of a purchase made. You need to define such variables in the scope of the order object.

Product Level

Use product-level variables to pass information about each individual item, such as product cart details. You need to define such variables in the itms array, which should be added to the order object.

If you need to pass several items, create additional items in the array.

Custom Variables

Adform variables can have predefined names, such as Sales or Order ID, or custom names that you can rename in the Adform platform.

You can use these variables to pass values at the order level or product level:

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

  • sv(x): Can pass any kind of a string and can vary up to sv96. You can use these variables only at the order level.

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

Adform supports the following variables:

Name

JS Variable Name

Used In

Value

Decoded Parameter Name

Report Type

Order-Level Variables

Sales

sales

Order

Real number

sl

Custom reports

Order ID

orderid

Order

String

id

Data exports

Currency

currency

Order

String

cur

Custom reports

Basket size

basketsize

Order

String

bsz

Custom reports

Gender

gender

Order

String

gen

Custom reports

Age group

agegroup

Order

String

age

Custom reports

Country

country

Order

String

cntr

Custom reports

Product-Level Variables

Product name

productname

Product

String

pnm

Custom reports

Product sales

productsales

Product

Real number

psl

Custom reports

Product ID

productid

Product

String

pid

Custom reports

Product category

categoryname

Product

String

pgr

Custom reports

Product category ID(DCO)

categoryid

Product

String

cid

N/A

Product count

productcount

Product

Integer

pcnt

Custom reports

Weight (DCO weight in rotation)

weight

Product

Integer

weight

N/A

Step (DCO view, basket, or purchase event)

step

Product

Integer

step

N/A

Custom Variables

var1 … var10

var1var10

Order

String

var1var10

Data exports

sv1 … sv7

sv1sv7

Both

String

sv1sv7

Custom reports

sv8 … sv96

sv8sv96

Both

String

sv8sv96

Data exports

svn1 and svn2

svn1 and svn2

Both

Real number

svn1 and svn2

Custom reports

sv97... sv255

sv97... sv255

Both

String

sv97... sv255

DMP

svn3... svn255

svn3... svn255

Both

Real number

svn3... svn255

DMP

Check Implementation

After you implement a tracking point, to check if it was activated, you can use Adform Site Tracking Helper extension for Chromium-based browsers.

Alternatively, you can check network requests via the 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.

If you need additional information or support, contact the Site Tracking team (site-tracking@adform.com).

Was this article helpful?

/
How we can make it better?

Thank you for your feedback!