Skip to main content

Adding Parameters to a Conversion Script

David Rolenc avatar
Written by David Rolenc
Updated over 2 weeks ago

There are multiple parameters that can be added to the conversion script. The parameters amount and External ID have special usages, other parameters are meant for any information you wish to send with conversions.

In order to learn more about the values of a parameter and how they can be filled with data, please refer to the following article - Methods of adding data to parameters.

How to Add the Amount Parameter

The parameter amount needs to be present in the conversion script if the conversion type in the conversion script is set to percentage commission model.

The following format is used to add the parameter amount to the conversion script:

<script>
trackdesk( YOUR_TENANT_ID, 'conversion', {
...
amount: {
value: 'exampleValue'
},
...
});
</script>

The value needs to be present in the parenthesis (e.g., value: '100' or value: '100.50' for decimals).

Third parties often use a specific placeholder for the value parameter. You can usually find this information in their knowledge base or help center. The quickest way, however, is often to ask their support team directly.

Another approach is to include the value parameter in the query parameters (URL), allowing us to retrieve this information directly.

Alternatively, a developer can implement a custom function to dynamically insert the value as needed.

How to Add the External ID and Customer ID Parameters

A parameter's External ID has a special purpose and is used for the deduplication of conversions. When the conversion is created with an External ID, no other conversion can be created with the same External ID. This will allow you to deduplicate conversions, for example, in situations when a request for a conversion could be sent more times.

A parameter Customer ID has no special purpose; it is meant for your custom values.

The following format is used to add parameters External ID and Customer ID to the conversion script:

<script>
trackdesk( YOUR_TENANT_ID, 'conversion', {
...
externalId: 'exampleValue',
customerId: 'exampleValue',
...
});
</script>

How to Add Adv S Parameters

The parameters Adv S1 - Adv S5 have no special purpose; they are meant for your custom values.

The following format is used to add parameters Adv S1 - Adv S5 to the conversion script:

<script>
trackdesk( YOUR_TENANT_ID, 'conversion', {
...
customParams: {
advS1: 'exampleValue',
advS3: 'exampleValue',
}
...
});
</script>

Did this answer your question?