Implementing your own tracking code

Video: the concept of third party tracking

Watch this video to understand the concept of third party tracking:

Before you start

As was explained in the video above, it is important to make a distinction between the following types of third party tracking codes:

  • Codes that transmit data on behavior of customers. These codes need to be implemented in the container tag manager, which allows them to be fired on the website of the advertiser. Please note that you cannot implement these codes yourself. If you want them to be implemented, make sure you contact the support team of your platform.

  • Codes that transmit data related to conversions. You can implement these codes yourself by following the instructions below.

Video: implementing codes

Watch this video to see how you can implement your own tracking codes. A comprehensive description can be found below.

Getting started

Make sure you are logged in to your partner UI and click on ‘3rd party tracking settings’ in the navigation menu. If you do so, a page will appear looking more or less like this:

You will see the page has two sections: one for the third party tracking services and one for the code sets. The tracking service defines under what conditions the code you implement is fired. Under code set, you can register the actual tracking code and define the parameters.

Implementing the code set

Overview

To implement a new code set, please click on the button create new code set in the code set section of the page. If you do so, a page will appear looking more or less like this:

The further proceedings depend on the type of code you are implementing. Currently, three types can be implemented:

  • An image pixel

  • javascript

  • An iframe (inline frame)

Because they can effect the performance of the advertiser’s confirmation page, javascripts and iframes need to be approved by the platform administrator before they are activated.

Implementing an image pixel

Compared to the other code types, implementing an image pixel is relatively easy. All you need to do is go through the following steps:

  1. Enter a name and a description of your code set. Please do not activate the advanced mode, because it is only relevant for javascripts and iframes.

  2. Proceed to paste your tracking code into the field under the header ‘tracking URL’.

  3. Define the parameters in your code. After you have pasted in your tracking code, the platform will automatically recognize all the parameters in your code.

    • If you are using dynamic parameters, you need to make sure they are filled with the correct placeholders. To do this, you need to select the relevant placeholders from the panel on the right of the page and drag and drop them into the fields under ‘parameter value’. Please note that here are three types of placeholders:

  • Essential placeholders transmitting values for the order ID, the order value and and the currency of the conversion.

  • Extended placeholders transmitting values such as the sub ID, the timestamp and the ad media ID.

  • Placeholders that can only be used when the tracking service you implement uses the server to server delivery method.

When you have selected the relevant placeholders for your dynamic parameters, all you have to do is click ‘save’ at the bottom of the page. Your code will be activated immediately, because image pixels do not require approval from the platform administrator.

If you want basket details to be transmitted via third party tracking, please read the section on image pixels in the article on transmitting basket details.

Implementing an iframe or a javascript

To implement an iframe or a javascript, make sure you go through the following steps:

  1. Start by giving your code set a name and a brief description.

  2. Proceed to activate the advanced mode by hitting the tick box. If you do so, you will see a new section appearing at the bottom of the page, called ‘tracking HTML codes’.

  3. Before you implement the iframe or the javascript , make sure you implement an image pixel under ‘tracking URL’. This is not mandatory, but it is recommendable as the image pixel can be used as a backup when your iframe or javascript cannot be fired because the customer’s browser settings are blocking iframes and javascript. If your image pixel contains dynamic parameters, make sure you add the correct placeholders.

  4. When you have created the fallback, scroll down the page to the ‘tracking HTML codes’ section.This section will look more or less like this:

In this section, go through the following steps:

 

  1. Remove all script that is visible in the field under ‘new version’ and replace it with the iframe or javascript you want to implement. In case you hadn’t implemented any codes yet, the field under previous version will be empty. If you are replacing or editing a javascript or iframe, this field will contain the code you have implemented earlier.

  2. Make sure all dynamic parameters are filled with the right placeholders. These placeholders can be copied directly from the panel above the field where you paste the new codes. Please note there are essential placeholders (order ID, order value and currency) and extended (such as ad media ID, timestamp and conversion site ID). If you want the javascript to transmit basket details, please read the section on javascript in the article on transmitting basket details via third party tracking.

  3. Further below in the section, you can write a comment for the platform administrator related to the iframe or javascript you want to implement, explaining the purpose of the iframe or javascript you are implementing, for example.

  4. As was mentioned above, your iframe or javascript needs to be approved by the platform administrator before it is activated. To request approval, select the tick box ‘save and request approval’ under ‘approval workflow state’. If you do not want to request approval yet, select the tick box ‘save, but do not request approval’.

When you are ready, please do not forget to click ‘save’ at the bottom of the page.

Editing a code set

If you want to edit a code set, just click on the  icon in the code set panel on the overview page. If you do so, you will be taken to the same page on which you have implemented your code set. Please not changes in implemented iframes and javascripts need to be approved by the platform administrator again. You can use the section below the comments to compare differences between the new version and the previous one. The versions can be displayed next to each other and on top of each other.

Removing a code set

Before you are able to remove a code set, you need to make sure all tracking services connected with the code set have been removed. If this has been done, you will see a small  appear next to the code set in the code set panel. If you click on this icon and confirm your action in the system window, the code set will be removed.

Tracking services

Creating a new tracking service

After you have implemented your code set, you need to create a tracking service. The tracking service defines under which conditions the code set you have implemented is activated. To create a tracking service, go back to page with the overview of all third party tracking settings. Go to the panel ‘third party tracking services’ and click on the button ‘create new tracking’ service in the right lower corner of the page. If you do so, a new row will be added to the panel, looking more or less like this:

From left to right, following settings have to be defined:

  • Under ‘service’, you give your service a name.

  • Under ‘code set’, you select the code set for which the service is created.

  • Under ‘delivery’, you select the delivery method. Possible options are ‘browser side’, ‘server side’ (implying server to server tracking) or ‘both’:

    • Use ‘browser side’ for javascript and iframes without an image pixel as backup. Browser side delivery can be used for image pixels as well, but is not recommended.

    • Use ‘server side’ for image pixels. Server side delivery is more accurate and allows you to transmit additional data, such as the commission model.

    • Use ‘both’ for javascript and iframes with an image pixel as backup. In this case, the javascript and iframes can be delivered properly and, in case they are blocked, the image pixel will be fired with the highest accuracy.

  • Under ‘ad space’, you select the ad space for which the service is relevant. If the service is relevant for all your ad spaces, just select ‘all’.

  • Under ‘advertiser’, you select the advertiser for which the code set should be fired. Please note you can only select advertisers when you have been admitted to their programs.

  • Under ‘conversion target’, you select the conversion target for which the code set should be fired. Please note the available conversion targets will depend on the advertiser you select in the column before.

  • Under ‘product category’, you select the product category for which the code set should be fired. Unless you have implemented a very specific code set, it is recommended to select ‘all’ here.

  • To activy your service, make sure you select ‘active’ under ‘status’.

To save your service, please click on the  icon.

Editing a tracking service

To edit a tracking service, all you need to do is click on the  icon in the panel. If you do so, you will see all values are unlocked. Change whatever you want and click on the  icon to change your changes.

Removing a tracking service

You can remove a tracking service by clicking on the  icon in the tracking service panel and confirming your action in the system window appearing after you’ve clicked the icon. You can also choose to deactivate the tracking service by changing the status.

Creating replacement sets

Do I need to create replacement sets?

You only need to create replacement sets when the format of the values in the code’s parameters in your code set does not match with the format of your own system. In this case, a replacement set will make sure that any sequence of characters is replaced by another sequence of characters you define. For example, you could use a replacement set to translate the names of conversion targets or tracking categories. Please note that values transmitted via a server side delivery method cannot be replaced.

Creating a replacement set

To create a replacement set, make sure you go through the following steps:

  • Go to the overview page of the third party tracking settings and hit the tick box ‘show replacement settings’ below the panel of the code sets.

  • If you do this, a new panel will appear below the code set panel. To create a new replacement set, click on the button ‘create new replacement set’ in the right lower corner of the panel.

  • In the window appearing now, give your replacement set a name and a brief description.

  • Proceed to click the button ‘add new replacement’. Fill out the value you want to replace under ‘original value’ and the value you want it to replaced by under ‘replace with’.

  • To add more values, just click on the button ‘add new replacement’ again. To remove values, click on the  icon next to them.

  • When you are ready, click on the button ‘save’. If you do so, you will find the replacement set added to the overview.

  • Finally, make sure you activate the replacement set by adding it to one or more tracking services. To do so, edit the tracking service and select it under ‘replacement set’.