Skip to main content

Adding Parameters to a Conversion Script

Add the amount, External ID, Customer ID, and Adv S parameters to the conversion script.

Written by Trackdesk Team

The conversion script supports several parameters. The amount and externalId parameters have special meaning; the rest are general-purpose fields for any custom data you want stored with the conversion.

Amount

The amount parameter must be present in the conversion script when the conversion type uses a percentage commission model.

The following format is used to add it to the conversion script:

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

Note that the amount parameter must be provided as a string, in the format "100" for whole numbers or "100.50" for decimals.

Third parties often use a specific placeholder for the value of the amount parameter. You can usually find this information in their knowledge base or help center, or by asking their support team directly.

Another approach is to pass the value as a URL query parameter, so Trackdesk can read it directly. Alternatively, a developer can implement a custom function to insert the value dynamically.

External ID and Customer ID

The externalId parameter has a special purpose: it is used for conversion deduplication. When a conversion is created with an externalId, no other conversion can be created with the same value. This is useful when a conversion request might be sent more than once (for example, due to a page refresh or a retry).

The customerId parameter has no special purpose; it is meant for your own custom values.

The following format is used to add both parameters to the conversion script:

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

Adv S1 to Adv S5

The advS1 to advS5 parameters have no special purpose; they are meant for your own custom values. You can use any subset of them.

The following format is used to add them to the conversion script:

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

See also

Did this answer your question?