Conversion Tracking Implementation: Guide for shops

 

Why conversion tracking?!

Conversion tracking allows to attribute sales and events to traffic sources. Then as the next step the attribution of monetary value to the registered events and sales is possible (rating). This means for example to pay a commission for a tracked sale.

 

Reports of collected conversion data allow judgements and analysis of performance, developments, costs, amounts and potentials for optimization.

 

Basis for all data collection and analysis is the implementation of a conversion tracking tag on the confirmation page that is displayed after completion of the sale.

in a nutshell

conversion tracking connects clicks and sales, that were registered via a tracking tag.

Click out: Additional Parameters

For the analysis of your traffic in other systems like Google Analytics, the Ingenious systems automatically can add parameters (e.g. UTM parameters) to links and redirects.

Values of the parameters can have

  • static values (e.g. utm_source=affiliate)

  • dynamic values (e.g. utm_source=#{PARTNER_ID}, the partner id of the corresponding partner)

You can find the additional parameter tool under Manage Advertisers > Advertiser Tracking .

The Click Id

An important parameter for a functioning tracking is the click id. It works as a fallback, in case no cookie could be found. This is a quite common case with third party tracking cookies.

The click id is transmitted with every click to the shop as get-parameter in the URL. The shop fetches and saves this click id and then returns it to the tracking system, when the conversion tracking tag is executed.

Usually, Ingenious adds a click id automatically to every (bounce) tracking link. The name of the Ingenious click id is ICLID. It looks like this (example)

https://www.shop.com/?iclid=#{ICLID}

where #{ICLID} will obviously be replaced by the click id.

 

Rare exception

In (usually very rare) cases, where you need to set up the transmission of the click id manually (for example if a certain specific parameter is needed, you may do the set up manually.

1. set up the click id as additional parameter: First, create the click id parameter that will be added to the target URL e.g. clicklid=#{ICLID}. This is done in the system under Manage Advertisers > Advertiser Tracking

read on

A detailed guide to additional parameters can be found here:

https://ingenioustechnologies.atlassian.net/wiki/spaces/KB/pages/1440383140

 

The Shop needs to save the click id / iclid

The shop fetches the click id from the URL and saves it either in a first party cookie or in the data base.When saving it in a cookie, we recommend to set the cookie server side (e.g. with PHP)

Examples

Code example PHP: Cookie with click id server side:

<?php if (isset($_GET["clickid"])) { setcookie("clickid", $_GET["clickid"], time() + 365 * 24 * 60 * 60); } ?>

JavaScript code example: Cookie with click id set in the browser:

 

<html> <!-- ... --> <body> <div id="mydiv">Hello, this a Test Page</div> <script> function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } function saveClickId(qparam) { //Get ClickID and save to Cookie var urlParams = new URLSearchParams(window.location.search); if (urlParams.has(qparam)) { var cli = urlParams.get(qparam); setCookie(qparam, cli, 60); } } (function() { //read new value with name clickid saveClickId('clickid'); //show value in Browser var para = document.createElement("P"); var t = document.createTextNode("This is the ID: " + getCookie('clickid')); para.appendChild(t); document.getElementById("mydiv").appendChild(para); })(); </script> </body> </hmtl>

Fetching the click id on the confirmation page in order to include it in the conversion tracking tag.

Example code fetch click id from cookie with PHP

 

Example code to fetch the click id in the browser with JavaScript

 

Data Structure: Conversion Targets and Tracking Categories

Tracking events are defined by two dimensions: Conversion targets and tracking categories. These dimensions can then be analyzed and remunerated (e.g. a commission per sale).

Conversion targets as well as tracking categories should be registered to the system, before they are transmitted via an implemented conversion tracking tag. Set up is done in the system under Manage Advertisers.

  • Conversion target: Defines an event and its type, for example Sale, Appinstall, Newslettersignup.

  • Tracking Category: Defines the commercial dimension, for instance according to the margin of a product group, for example a product group (“Flight”, “Hotel”, “Car Rental”)

read on

A detailed guide on conversion targets and tracking categories can be found here:

https://ingenioustechnologies.atlassian.net/wiki/spaces/KB/pages/1440579665

https://ingenioustechnologies.atlassian.net/wiki/spaces/KB/pages/1440743505

Conversion tag

The conversion tracking tag is implemented on the confirmation page after the sales process (or in case of other events on the corresponding pages). This way a completed sale or event will be measured. Data is transmitted with the help of several variables and parameters, for example order id or basket value.

Types of tags

You can either get the conversion tracking tag through the user interface under Trail -> Tracking tags.

Please implement your individual conversion tracking tag that contains your advertiser id and your tracking domain. Please do not use the PHP/JavaScript code of the following examples as it is.

read on

A detailed guide to generate the conversion tracking tag can be found here:

JavaScript

We generally recommend the use of JavaScript code when implemented browser side.

The JavaScript Code is very suitable for implementation in JavaScript environments such as tag management systems. Another advantage is that the basket parameter (JSON Object) can be easily included. Also it has additional functionalities like a container functionality.

Example:

Image Pixel

For simple tracking events (usually the ones without a basket) the image pixel is well suited. Also, many tracking switches require an image pixel.

Example:

S2S Callback

If you want to transmit the conversion tracking information outside of a browser, e.g. to bypass ad blockers or browser regulation or from the SDK of a mobile app, the S2S callback URL is suitable.

Important: The click id is mandatory, without click id server to server tracking does not work.

The S2S callback link is quite similar to the image pixel. To convert an image pixel to a S2S callback URL just change the parameter typ=i to typ=s .

Example:

read on

A detailed guide on generation of S2S callback URLs can be found here:

Mandatory parameters

 

 

Variable (JS)

Variable (img/ s2s)

Example

Description

convTarget

ctg

sale

Conversion Target. The supplied conversion target needs to be registered in the system.

trcCat

trc

default

Tracking Category. The supplied tracking category should be registered in the system and has to be active.

Tracking category 'default' will be used implicitely when none or unknown tracking category is supplied.

In case of basket tracking the value “basket” should be used.

convId

cid

ORD12345

Conversion ID/ Order ID: This parameter identifies the conversion and should be unique. In case the ID contains sensitive information such as an email address, it should be hashed. Max length 255 chars.

ordValue

orv

4.98

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

ordCurr

orc

EUR

Currency Code (ISO 4217)

siteId

sid

checkout

Sie ID: This parameter identifies the page on which the conversion is made.

clickId

cli

1234567890

Click id, that was transmitted with the click-in to the website. Usually it is the iclid and as well the the gclid, fbclid. For S2S callbacks this parameter is mandatory.

Optional parameters (frequently used)

Variable (JS)

Variable (img/ s2s)

Explanation

Example

discValue

dsv

This parameter transmits any discount values related to the conversion. When a discount is applied, please do not change the order value, the system can deduct the discount value from the order value.

12.34

discCode

dsc

Code of the used voucher.

XMAS2020-4578aved

custId

csi

This important parameter transmits any ID given to the customer who placed the conversion. Use this for implementing cross-device and cookieless tracking. Max length 255 chars.

bon78945

session

session

This important parameter transmits any ID given to the session of the customer who placed the conversion. Use this for implementing cross-device and cookieless tracking. Max length 255 chars.

ses345

isCustNew

csn

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

true

payMethod

pmt

Payment method

paypal

userVal1

uv1

This parameter can transmit additional information.

 

userVal2

uv2

This parameter can transmit additional information.

 

userVal3

uv3

This parameter can transmit additional information.

 

userVal4

uv4

This parameter can transmit additional information.

 

read on

A detailed guide tracking tag implementation and a list of all parameters can be found here.

Basket tracking

Basket tracking adds basket positions to a conversion. This way all individual products that are part or a conversion can be remunerated and/or analyzed.

Requirement: There needs to be a tracking category (trc) with name and alias “basket” .

The basket parameter contains a string in JSON format. When using an impage pixel or S2S callback URL the basket object needs to be URL-encoded.

The individual components of the basket data are shown in the table below:

Variable

Example

Description

id

1

Optional
The ID of this position which needs to be 1 or higher, max value 32767. Can be submitted to address this position later. Generated automatically if empty.

uuid

0d5bb776-2d50-4d65-912c-d20e324f66b8

Optional
A valid UUID of this position. Can be submitted to address this position later. Generated automatically if empty.

pid

12345678

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

prn

Adidas Originals Continental

Name of the product

brn

Adidas

Branc

pri

54.95

Price of the product (gross)

qty

1

Quantity of bought units

trc

default

Tracking category of the product. The tracking category needs to be registered to the system. In case no specific tracking category should be applied, please use “default”

prc

Clothing.Men.Shoes

Optional: Hierarchie of the product category. Use ‘.’ as separator.

Example (without any technical identifier)
No id / uuid is submitted and will be generated internally

Example (with optional uuid identifier)
A valid uuid is submitted and can be used to address this positions

The onpage tag

The onpage tag should be implemented on all publicly accessible pages. Its main purpose is the detection of incoming traffic. Further functionalities are related to traffic quality and a container functionality.

Variable

Example

Description

siteId

www.shop.com/dresses/red-dress123.html

Path or URL of the Page

productId

12345678

Only for product pages: Unique product id of the shown product.

custId

bon78945

This important parameter transmits any ID given to the customer. Use this for implementing cross-device and cookieless tracking. Max length 255 chars.

session

ses345

This important parameter transmits any ID given to the session of the customer. Use this for implementing cross-device and cookieless tracking. Max length 255 chars.

locationHref

Result of window.location.href call

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

userVal1

 

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

userVal2

 

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

Cookies and data protection

When working with tracking technologies, one should (or even is required to) be transparent about it in the privacy policy. Also, an opt-out possibility should be provided.

The following test is a suggestion for a section in the privacy policy of shops working with Ingenious Technologies. Tracking domain as well as external advertiser id (i-number in conversion tracking tag) should be completed:

 

Tracking technology of the Ingenious Enterprise platform | Usage of cookies

We are using a tracking technology provided by Ingenious Technologies AG, Französische Straße 48, 10117 Berlin, to connect customers’ views and clicks on advertising media (so called touch points) with their actions (for example a sale or a registration). For every touch point and every action, your browser sends a so called HTTP-request to the server of Ingenious Technologies, along with certain data. This data consists of the URL of the website on which the advertising media is placed (referrer URL), information on the browser, operative system and device, further technical data (so called HTTP-header), the time and date of the touch point, the IP address of the device and, if available, cookies stored previously by Ingenious Technologies and all the information they carry. Please note that the IP address is anonymized by Ingenious Technologies automatically.

A cookie is a small package of data which is transferred between your browser and the server. In this package, information related to the advertising media can be stored, for example the content of a shopping basket.

To document actions, the tracking technology stores cookies on your device. In the cookie, information on the last touch points is stored. This information includes data related to touch points, i.e. clicks and views of advertising media produced on your device. Furthermore, an ID is added to the cookie. Stored data on touch points and actions will be allocated to this ID. Stored touch points can be used to create a so called customer journey, which identifies all touch points preceding an action.

An action request usually involves the order ID and the order value of your order. In some cases, the following values can be submitted and stored as well: your customer ID, your age and gender, your answers to customer surveys and a marker in case you are a new customer.

Both the data transmitted to Ingenious and the cookies have the sole purpose of monitoring the effectivity of advertising media and the corresponding clearance. This usage is compliant with the legitimate interest as defined in the General Data Protection Regulation of the EU.

If you do not want cookies to be stored in your browser, you can adjust your browser settings. Depending on the type of browser you use, you can prevent the storage of cookies in your browser settings or limit the storage to specific websites only. Please note that this might hamper the performance and limit your usage of certain websites. You can also delete cookies at any moment. In this case, the data stored in cookies will be deleted permanently.

Storage and usage of tracking can be also disabled by clicking on the following tracking opt-out link:

https://<Tracking-Domain>/ts/<Advertiser-ID>/tsv?settrackingoptout=a

In case the tracking opt-out link is clicked, a special cookie is stored which disables tracking for the browser used to enable the request on your device. Tracking will be applied again when you delete this cookie.

What cookies are used for what tracking purposes is explained in the following table in detail:

 

Domain

 

 

Cookie name

 

Purpose of the cookie and additional information

 

<client tracking domain>

 

tsv

This cookie is used when an advertising medium is displayed. The cookie contains a cookie ID and a list with data related to previous touch points: the time and data, the referrer URL and an advertising media code, which identifies the channel, publisher, website and specific advertising medium.

 

 

<client tracking domain>

 

 

tsc

This cookie is used when an advertising medium is clicked on. The cookie contains a cookie ID and a list with data related to the previous touch points: the time and data, the referrer URL, the ID of the page of the advertiser to which the click is forwarded and an advertising media code, which identifies the channel, publisher, website and specific advertising medium.

 

<client tracking domain>

 

trackingoptout

This cookie is uses, when the opt-out-link is clicked on, in order to disable tracking for the browser used.

Tracking quality

Tracking with third party cookies today is significantly restricted, data cannot be recorded properly. Reasons are browser regulation (e.g. Safari, Firefox) or the use of ad blocking software. Third party cookies are all cookies from domains that differ from the shop domain.

We recommend a combination of measures. They can obviously be adapted according to the use case.

  • Use of a first party tracking domain (for setup, please contact Ingenious Technologies)

  • Implementation of the click id, that should be saved with the use of server side technologies (PHP)

  • Implementation of the onpage tag

  • Use customer id (which can be encrypted or hashed)

  • Use session id

  • in case of third party tracking: Execution of the conversion tag server side (S2S callback) to bypass regulated browsers or ad blockers