Before proceeding with the integration, ensure you have the redirect landing page properly set up in your offers. You can find more details about setting them up in this article.
The following guidelines apply only to offers with redirect landing pages.
When using redirect tracking, a CID is provided when the user lands on the landing page (the CID is present in the visitor's URL upon arrival to the landing page).
Save the CID from redirect landing page URL
Save the CID parameter from the URL on your side (e.g., in a database, local storage, or cookie). You will need this parameter for the next steps. We will refer to this parameter as OUR_CID from now on.
Create a conversion
To create a conversion for redirect tracking, you can use either GET or POST methods of postback. Details on each method are provided below.
GET postback
GET postback
Fixed amount
To send a GET postback for an offer with a fixed amount, use the following postback to create a conversion:
https://YOUR_TENANT_ID.trackdesk.com/tracking/conversion/v1?conversionTypeCode=SELECTED_CONVERSION_TYPE&cid=OUR_CID
Replace YOUR_TENANT_ID with your actual tenant ID.
Replace SELECTED_CONVERSION_TYPE with the conversion type that should be created via postback (e.g. sale).
Replace OUR_CID with the Trackdesk's CID.
Revenue share
To use revenue share for an offer with a dynamic amount, you also need to provide the amount of revenue when creating the conversion. The amount is used in the system to calculate the commission of the network and affiliate.
Here is the GET postback to create a conversion for a revenue share scenario:
https://YOUR_TENANT_ID.trackdesk.com/tracking/conversion/v1?conversionTypeCode=SELECTED_CONVERSION_TYPE&cid=OUR_CID&amount.value=AMOUNT_PLACEHOLDER
Replace YOUR_TENANT_ID with your actual tenant ID.
Replace SELECTED_CONVERSION_TYPE with the conversion type that should be created via postback (e.g. sale).
Replace OUR_CID with the Trackdesk's CID.
Replace AMOUNT_PLACEHOLDER with the amount you want to prorate to the system to calculate the commission of the network and affiliate.
OPTIONAL: adding extra parameters to GET postback
Up to 9 parameters for additional information can be added with a conversion. To add extra parameters to the GET postback, use the formats below.
A builder-like tool can be found here in the API documentation, allowing you to build the postback link - LINK
Extra parameters
Adv S1-Adv S5: General parameters for any information. There are a total of 5 of these parameters. Use the following format to add these parameters to the postback (example for Adv S1 parameter shown)
customParams.advS1=VALUE
Customer ID: General parameter for any information. Use the following format to add this parameter to the postback
customerId=VALUE
External ID: Parameter used for deduplication. This parameter can be present only once on the platform, generally an Order ID or other internal ID uniquely identify transaction is used. Use the following format to add this parameter to the postback
externalId=VALUE
Currency: Parameter used to specify the currency for the conversion. This parameter can be used only for cases with revenue share. Use the following format to add this parameter to the postback
currency.code=VALUE
Where VALUE is currency code in ISO 4217 format
Status: Parameter used to specify the conversion status that the conversion will be created with. Use the following format to add this parameter to the postback
status=VALUE
POST postback
POST postback
Fixed amount
To send a POST postback for an offer with a fixed amount, use the following postback to create a conversion:
Endpoint:
https://YOUR_TENANT_ID.trackdesk.com/tracking/conversion/v1
Payload:
{
"conversionTypeCode": "SELECTED_CONVERSION_TYPE",
"cid": "OUR_CID"
}
Replace YOUR_TENANT_ID with your actual tenant ID.
Replace SELECTED_CONVERSION_TYPE with the conversion type that should be created via postback (e.g. sale).
Replace OUR_CID with the Trackdesk's CID.
Revenue share
To use revenue share for an offer with a dynamic amount, you also need to provide the amount of revenue when creating the conversion. The amount is used in the system to calculate the commission of the network and affiliate.
Here is the POST postback to create a conversion for a revenue share scenario:
Endpoint:
https://YOUR_TENANT_ID.trackdesk.com/tracking/conversion/v1
Payload:
{
"conversionTypeCode": "SELECTED_CONVERSION_TYPE",
"cid": "OUR_CID",
"amount": {
"value": "AMOUNT_PLACEHOLDER"
}
}
Replace YOUR_TENANT_ID with your actual tenant ID.
Replace SELECTED_CONVERSION_TYPE with the conversion type that should be created via postback (e.g. sale).
Replace OUR_CID with the Trackdesk's CID.
Replace AMOUNT_PLACEHOLDER with the amount you want to prorate to the system to calculate the commission of the network and affiliate.
OPTIONAL: adding extra parameters to POST postback
Up to 9 parameters for additional information can be added with a conversion. To add extra parameters to the POST postback, include them in the payload as shown below.
A builder-like tool can be found here in the API documentation, allowing you to build the postback link - LINK
Extra parameters
Adv S1-Adv S5: General parameters for any information. There are a total of 5 of these parameters. Use the following format to add these parameters to the postback (example for Adv S1 parameter shown)
"customParams": {
"advS1": "VALUE"
}
To use more Adv S parameters following format is used"customParams": {
"advS1": "VALUE",
"advS5": "VALUE"
}Customer ID: General parameter for any information. Use the following format to add this parameter to the postback
"customerId": "VALUE"
External ID: Parameter used for deduplication. This parameter can be present only once on the platform, generally an Order ID or other internal ID uniquely identify transaction is used. Use the following format to add this parameter to the postback
"externalId": "VALUE"
Currency: Parameter used to specify the currency for the conversion. This parameter can be used only for cases with revenue share. Use the following format to add this parameter to the postback
"currency": {
"code": "VALUE"
}Where VALUE is currency code in ISO 4217 format
Status: Parameter used to specify the conversion status that the conversion will be created with. Use the following format to add this parameter to the postback
"status": "VALUE"
Refer to the API documentation for all allowed options - LINK
Optional: Refund handling
Optional: Refund handling
Refund of conversions can be handled via API request from client’s side. The API request is initiated on a webhook indicating refunded state of the order/charge.
In order to work with refund handling you will need to use External ID in the create of conversion in the previous section. This parameter is a unique parameter that is used for conversion status changes.
In the webhook indicating the refunded state you will need to have the information about the Order ID/Charge ID that is saved in the External ID parameter on conversion, so the record can be correctly paired.
If you prefer not to implement this part, it can be safely skipped. However, keep in mind that there may be cases where a commission is attributed to an affiliate, then later refunded. Ideally, you’ll want the affiliate commission to be canceled out along with the refund.
The API Request will consist of following:
API endpoint
https://YOUR_TENANT_ID.trackdesk.com/api/node/conversions/v1/update-status-by-external-id
Replace YOUR_TENANT_ID with your actual tenant ID.
Request data:
{
"revenueOriginId": "YOUR_REVENUE_ORIGIN_ID",
"externalId": "REPLACE_WITH_CHARGE_ID_OR_ORDER_ID",
"conversionTypeCode": "SELECTED_CONVERSION_TYPE",
"status": "CONVERSION_STATUS_REFUNDED"
}
Make sure to replace YOUR_REVENUE_ORIGIN_ID with your actual Revenue origin ID.
The placeholder REPLACE_WITH_CHARGE_ID_OR_ORDER_ID should be replaced with the charge ID of the refunded payment.
Replace SELECTED_CONVERSION_TYPE with the conversion type that should be created via postback (e.g. sale).