Docly

Mapping

Estimated reading: 2 minutes

As soon as an event type has been chosen and one or more providers have been selected, a block will appear for each provider with options to map fields. In fact, here you are going to set which parameters should have which values ​​in the Client Side or Server Side call.

Each block contains an option to place the call Client Side or Server Side. If one of these options is not visible, it is not supported by the provider in combination with the selected event.

Client Side
It executes script code in the visitor’s browser. In the case of CampaignSuite, this is always a Javascript code.

Server Side
Executes script code on the server. This has the advantage that Server Side calls can also be performed if the visitor has not been on the website for a long time, such as with successful payments. These are then executed ‘under water’ on the server.

In addition, each block has the ability to map parameters. The left column shows the available parameter values ​​(this can vary per provider) and the right column shows all available form fields and various other values ​​that can be used.

Open input fields

Both columns have the option of showing an open input field. In this field you can enter your own value instead of the value from one of the indicated options.
In the left column this is the last option in the dropdown called Add Custom Key and in the right column it is the last option in the dropdown called Add Custom Value.

Nesting key values

In some cases, arrays (collections) must be used in, for example, Client Side calls. The image below shows an example of such a collection:

<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
  'event': 'test_event',
  'transactionProducts': [
    {
      'sku': 'DD44',
      'name': 'T-Shirt',
      'price': 11.99
    },
    {
      'sku': 'AA1243544',
      'name': 'Socks'
      'price': 9.99
    }
  ]
});
</script>

It is clear here that transactionProducts is a collection of products. This can be done by linking keys with a period. It then looks like this in the mapping of a measurement: