Configuring and implementing tracking codes

Before you start

In order to track the online marketing events of the advertisers on your platform, you will need to implement tracking codes on the website of the advertiser. Please note you will need to implement two codes: the conversion code and the on-page code.

The conversion code should be implemented on any page on which a conversion is confirmed: the page on which a client is being thanked for his purchase, the page on which a client’s subscription for a newsletter is confirmed, etc. Before you implement a conversion code, you will have to configure it, depending on the advertiser’s needs.

The on-page code should be implemented on all other pages of the advertiser’s website. To configure it, you only need to choose a loading method and write a brief website description.

Also remember to receive the Click Id that is transmitted by the clickId Parameter from all incoming traffic, save it and to include it in the conversion code.

Consider to work with a first party tracking domain, since it usually allows the highest accuracy of tracking. Read more about first party tracking here.

As soon as you have implemented the codes, you should process a tracking test.

Preparation: The clickId

Especially in third party contexts (that means the tracking domain is a different one than the shop domain), the clickId is highly important to get tracking reliably working,.

All settings and configurations regarding the clickID should be done before implementing the tracking codes. Reason is, that the clickId needs to be included in the conversion code and thus should be available, when it is implemented.

Details about receiving a transmitted clickId, saving it and fetching it to include it in the code can be read here.

Getting started

The tracking codes for your advertisers can be found and configured in your UI. Click on ‘advertiser’ in the navigation menu and proceed to click on ‘manage advertisers‘. On the page you see now, find the advertiser you want to implement a tracking code for and click on the on the  iconin the technical section.

If you do so, you will see a page which is rather large, but basically consists of three sections:

  1. The section in which you can process the configuration of the tracking codes (defining the conversion target and tracking categories for the conversion codes; choosing a loading method and creating a description for both codes; adding parameters for the conversion code).

  2. Further below, you will see a panel in which the conversion code is displayed.

  3. At the bottom of the page, you will find the on-page code.

Configuring the conversion code

Basic configuration

The basic configuration of the conversion code takes place in the first section of the tracking code page. Make sure you go through the following steps:

  1. Choose a conversion target for which you want to create a conversion code for. Conversion targets usually designate an event type such as ‘sale’ or ‘appinstall.’ This conversion target should obviously correspond with the conversion of the confirmation page you want to integrate the code on. In case you work with multiple conversion targets, make sure the parameter is filled with the correct value from data layer. Conversion targets should be set up before implementing the conversion code.

  2. Select a tracking category for the conversion code you are implementing.  Tracking categories usually designate the commercial category of a conversion.
    If you are implementing a conversion code that should enable basket tracking, make sure you select ‘basket’. In case you work with multiple tracking categories, make sure the parameter is filled with the correct value from data layer. Tracking categories should be set up before implementing the tracking code.

  3. Define whether you want the third party tracking codes in the container if the tracking codes to load synchronous or asynchronous. When you select synchronous loading, the codes implemented in the container will be loaded as soon as the browser reaches the position of the tracking code in the source code of the page. When you select asynchronous loading, the codes implemented in the container will be loaded as soon as the browser has loaded the complete page. Asynchronous loading is highly recommended, although it requires you to make sure all third party tracking codes implemented in the container of the conversion code are asynchronous as well.

  4. After you have selected a conversion target and the tracking category, you will need to fill in a brief description of the page you want to implement the tracking code on. Make sure the description explains the event on the confirmation page unambiguously. We recommend that it is only one word, such as “checkout.”

  5. In case of session tracking/ working with the click ID: Make sure the click ID is transmitted with every ad media click to the corresponding target URLs. It should be transmitted as additional parameter. We recommend working with the click ID, since it allows tracking when no cookie is available. For more details read more here: Working with the clickId

Mandatory parameters

If you look at panel below the configuration section, you will find that the conversion code already contains six parameters. These parameters are mandatory and should not be removed from the conversion code.

Name (JS code)

Name (img code)

Explanation

Format

Example

Name (JS code)

Name (img code)

Explanation

Format

Example

convTarget

ctg

This parameter identifies the conversion target. The value of the parameter corresponds with the target you selected in the configuration panel.

Alphanumeric

AddBasket

trcCat

trc

This parameter identifies the tracking category. The value of the parameter corresponds with the category you selected in the configuration panel.

Alphanumeric

default

siteId

sid

For security reasons, this parameter identifies the page on which the conversion is made.

Alphanumeric

checkout_page

convId

cid

This parameter identifies the the conversion and therefore should be unique. In case the ID contains sensitive information such as an email address, it can be replaced by an alternative ID on the platform.

Alphanumeric

ORD12345

ordValue

orv

This parameter transmits the value of the conversion. If the conversion does not contain a value, the transmitted value should be '0.00'.

Numeric: #.#

25.00

ordCurr

orc

This parameter transmits the currency following ISO 4217. The currency should always correspond with the currency used on the advertiser's website.

Alphabetic

EUR

locationHref

hrf

The complete Browser-URL on which the tag was fired. Used to prevent accuracy issues in case of strict referrer browser policy. Please don’t change the default value window.location.href

URL

Result of window.location.href call

Adding advanced parameters

Before you start

Apart of the mandatory parameters that are added to the code automatically, you can add advanced parameters. Please note that in order for these parameters to work properly, the data they are designed to transmit need to be available. Parameters marked with an asterix (*) in the description can also be used without the underscore (_). For example, you can use ‘commissionfix’ instead of ‘commission_fix’.

The advanced parameters are sorted by purpose, let’s go through them one by one.

Name (JS code)

Name (img code)

Explanation

Format

Example

Name (JS code)

Name (img code)

Explanation

Format

Example

discValue

dsv

This parameter transmits any discount values related to the conversion.

Numeric: #.#

12.34

disCode

dsc

This parameter transmits any discount codes related to the conversion.

Alphanumeric

XMAS2016-4578aved

discOrdValue

ovd

This parameter transmits the order value minus the value of the voucher that was applied to the order. It only needs to be implemented to allow distribution via third party tracking.

Numeric: #.#

98,75

invValue

inv

This parameter transmits the total order value of a conversion, i.e. including shipping costs and VAT.

Numeric: #.#

123.45

confStat

cfs

This parameter transmits the status of the conversion. If it is not used, conversions will be registered with an open status. Therefore, you should only use this parameter when you want to confirm or cancel conversions automatically.

Numeric

1

uniqid

uniqid

This parameter is needed when you want to automate your validation process. For more information, please read this article.

Universally unique identifier (UU ID)

164a9ee7-4b7a-3a2a-802a-1a7a4be79e4a

Name (JS code)

Name (img code)

Explanation

Format

Example

Name (JS code)

Name (img code)

Explanation

Format

Example

isCustNew

csn

This parameter registers whether the customer was new to the advertiser. Possible values are true (new) or false (recurring).

Alphabetic

True

custId

csi

This parameter transmits any ID given to the customer who placed the conversion. Use this for implementing cross-device tracking.

Alphanumeric

bon78945

custGend

csg

This parameter transmits a value identifying the gender of the customer placing the conversion. Possible values are f (female) and m (male).

Alphabetic

f

custAge

csa

This parameter transmits the age of the customer placing the conversion.

Numeric

45

CustSurv

csr

This parameter transmits questions and answers to surveys held upon placing the order.

Alphanumeric: {"#":"#"}. Please note JSON format is higly recommended.

{"Your favorite movie":"Moonraker","Your favorite actor":"Sean Connery"}

payMethod

pmt

This parameter can transmit the payment method the customer chose when placing the order.*

Alphanumeric

paypal

addData

adt

This parameter can transmit costumer related data, such as the number of orders previously canceled or recommendations.

Alphanumeric: {"#":"#"}. Please note JSON format is highly recommended.

{"number_prev_cancellations":"12","recommended_by":"user_id: 15"}

userVal1

uv1

This parameter can transmit additional information. It can be a string, a JSON or another format.

Alphanumeric

12345

userVal2

uv2

This parameter can transmit additional information. It can be a string, a JSON or another format.

Alphanumeric

Berlin

userVal3

uv3

This parameter can transmit additional information. It can be a string, a JSON or another format.

Alphanumeric

Germany

userVal4

uv4

This parameter can transmit additional information. It can be a string, a JSON or another format.

Alphanumeric

Category: Newspaper Subscription

Custom values

The parameters in this section can transmit custom values related to the conversion or the customer, such as points given for a loyalty program. The content can be alphanumeric.

Basket tracking

A requirement for basket tracking is the tracking category ‘basket.’ we recommend to set it up before implementing the conversion code.

To enable basket tracking, please make sure you add the ‘basket’ parameter to the conversion code. Remember, the tracking category ‘basket’ should be set up. The only requirement for using this parameter is that your advertiser needs to be able to fill it with basket data in JSON format. The individual components of the basket data are discussed in the table below.

Name

Explanation

Format

Example

Name

Explanation

Format

Example

pid

The ID of the product to which the basket position relates.

Numeric

1234

prn

The name of the product to which the basket position relates.

Alphabetic

Green Hoover vacuum cleaner

pri

The price of the product to which the basket position relates.

Numeric: #.#

145.55

brn

The brand name of the product to which the basket position relates.

Alphanumeric

Hoover

qty

The number of ordered products.

Numeric

3

trc

The tracking category of the basket position, not to be confused with the tracking category of the conversion to which the basket position belongs. Any tracking category may be used except basket. If no specific tracking category is intended, please use default.

 

Never use the trc basket it will cause an error.

Alphanumeric

default

prc

The shop category of the product to which the basket position relates.

Alphanumeric

Household appliance

 

Name (JS code)

Name (img code)

Explanation

Format

Example

Name (JS code)

Name (img code)

Explanation

Format

Example

admCode

amc

This parameter transmits the complete ad media code of the click URL via which the conversion was generated.

Numeric: #.#.#

1234.5678.9012

subCode

smc

This parameter replaces any sub IDs added to the click URL via which the conversion was generated.

Alphanumeric

abc1234

clickId

cli

This parameter can transmit the ID of a click and enable attribution even when no cookie was dropped.

Numeric

123456789

(In JS code, use clickIds to transmit this value)

awc

Awin click checksum.

String

1001_1502695821_b670d81e22c9e8a87g423efcf034fbaa

(In JS code, use clickIds to transmit this value)

gclid

Google Ads click ID.

String

CjwKCAjwvZv0BRA8EiwAD9S8msHPVhhwIFhI3jzdnsgc_JZxyhR-RaZGs4j_86cmVljnIn7sgHCelU8AvbEfALw_wcB

(In JS code, use clickIds to transmit this value)

fbclid

Facebook Ads click ID.

String

IwAR1j1yBKErYRyrUR9mLw8lHZssY9GTabc9cyfZ9j_R1H29BjYJSuxbTKUUF

Configuring the on-page code

The on-page code is quite simple to implement, there are only few parameters to be taken care of.

Mandatory parameters

If you look at panel below the configuration section, you will find that the on-page code already contains five parameters, that you may work with. The parameter siteId is mandatory.

Name

Explanation

Format

Example

Name

Explanation

Format

Example

siteId

Mandatory: This parameter defines the placement of the code. It should be filled with the path of the page or the URL

Alphanumeric

 

productId

only on product pages: This parameter is the product ID, e.g. EAN or SKU

Alphanumeric

1234567890

userVal1

optional parameter, you are free to put in any additional information that may be needed

Alphanumeric

 

userVal2

optional parameter, you are free to put in any additional information that may be needed

Alphanumeric

 

locationHref

The complete Browser-URL on which the tag was fired. Used to prevent accuracy issues in case of strict referrer browser policy. Please don’t change the default value window.location.href

URL

Result of window.location.href call

Implementing the tracking codes

Why use the full conversion code?

After you have done the basic configuration, selected additional parameters and decided whether or not you use basket tracking, all that you need to do before you can start implementing the conversion code is choose what type of conversion code you need. As you can see from the dropdown menu in the second section, you can choose between a code that is reduced to an image pixel and a full code including javascript. It is strongly recommended to use the full code, because it allows you to implement tracking codes from partners and integrate existing partner networks.

Why use the on-page code?

To process basic tracking, implementing the on-page code is not necessary. However, it is strongly recommended you use it nonetheless, for four reasons:

  • The on-page code enables you to track page impressions, i.e. the number of times a customer sees a page on your advertiser’s website or in its app after the initial click on the ad media item.

  • The on-page code allows you to process click-in tracking. This is a tracking process which captures clicks without the need of a tracking URL, which enables Bounceless tracking. It is also allows you to track traffic from CRM newsletters and comparable marketing channels in which links should not be recognizable as tracking links.

  • The on-page code contains a container tag which facilitates the integration of tracking codes from partners, allowing them to gather customer-related data. This is particularly important for partners using retargeting and cashback marketing strategies. Please note the container tag of the on-page code is loaded asynchronous, so it will not affect the performance of the advertiser’s website.

  • The on-page code allows you to work with the so called universal tracking parameter (UTP), which improves the tracking quality significantly. For more information, please read this article.

Implementation: Placement of the tracking codes

If you have finished your configuration of the conversion code, all you need to do is copy the conversion code and the on-page code and paste them into the source code or tag management solution of the relevant advertiser pages. Also, please make sure the needed values are transmitted (e.g. with the corresponding placeholders).

  • Conversion code: As was mentioned already, the conversion code needs to be implemented on the confirmation page of the conversion you have configured the tracking code for.

  • On-page code: The on-page code needs to be implemented on all other publicly accessible pages.

Please note that you should process a tracking test after you have implemented the tracking code to make sure it is working properly.

See also our guide to conversion tracking implementation.

IAB TCFv2.0 parameters

The Transparency and Consent Framework (TCF) was created to help all parties who display and manage digital advertising and develop targeted content comply with the European Union’s General Data Protection Regulation (GDPR) and ePrivacy Directive (ePD) when processing personal data and/or accessing and/or storing information on a user’s device. It allows publishers and website operators to communicate to vendors, in a standardized way, what preferences users have expressed when it comes to their personal data. A vendor is a company that participates in the delivery of digital advertising within a publisher’s website, app, or other digital content, that either accesses an end user’s device or browser or processes personal data about end users visiting the publishers content.

Ingenious Technologies is a registered TCFv2.0 Vendor with the Vendor ID 871.

More information can be found in the main article about TCFv2.

Name (JS code)

Name (img code)

Explanation

Format

Example

Name (JS code)

Name (img code)

Explanation

Format

Example

gdpr

gdpr

not set : TCFv2.0 not implemented
0: GDPR does not apply
1: GDPR applies

Numeric: # (0 or 1)

gdpr=1

gdprConsent

gdpr_consent

Only meaningful if gdpr=1. URL-safe base64-encoded TC string obtained from the CMP JS API or OpenRTB. Must contain the consent for Vendor ID of the advertiser or for Vendor ID 871 (Ingenious Vendor ID) as default

Base64-encoded string

gdpr_consent=CO7KqXfO7KqXfCVAAAENAwCMAP_AAH_AAAAAGLtV_T9fb2vj-_Z99_tkeYwf95y3p-wzhheMs-8NyZeH_B4Wv2MyvBX4JiQKGRgksjLBAQdtHGlcTQgBwIlViTLMYk2MjzNKJrJEilsbO2dYGD9Pn8HT3ZCY70-vv__7v3ff_3gYu1X9P19va-P79n33-2R5jB_3nLen7DOGF4yz7w3Jl4f8Hha_YzK8FfgmJAoZGCSyMsEBB20caVxNCAHAiVWJMsxiTYyPM0omskSKWxs7Z1gYP0-fwdPdkJjvT6-___u_d9__eAAA.IGLtV_T9fb2vj-_Z99_tkeYwf95y3p-wzhheMs-8NyZeH_B4Wv2MyvBX4JiQKGRgksjLBAQdtHGlcTQgBwIlViTLMYk2MjzNKJrJEilsbO2dYGD9Pn8HT3ZCY70-vv__7v3ff_3g