Skip to main content

Redirect Tracking

Send conversions back to Trackdesk with a postback when using redirect tracking.

Before proceeding with this integration, ensure you have your redirect landing page properly set up in your offers. You can find more details about setting them up in this article.

⚠️ Important: The following guidelines apply only to offers using redirect landing pages.

When using redirect tracking, a Click ID (CID) is generated and appended to the visitor's URL as soon as they land on the page.


​

Step 1: Save the CID from the redirect URL

Your first step is to capture and save the CID parameter from the URL on your end (for example, in your database, local storage, or as a cookie). You will need this parameter for the subsequent steps to record conversions.

We will refer to this parameter as CLICK_ID going forward.

Connecting to an external advertiser

If you are working with an external advertiser, they might already have their own affiliate tracking solution. In this case, simply agree with the advertiser on which query parameter you should use to pass the CID to them. These parameters are typically called sub parameters, aff parameters, or source parameters.


​

Step 2: Create a conversion

To record a conversion for redirect tracking, you can use either a GET or POST postback method.

Option A: GET postback

Fixed amount offers

To send a GET postback for an offer with a fixed commission amount, use this URL structure:

https://TENANT_ID.trackdesk.com/tracking/conversion/v1?conversionTypeCode=CONVERSION_TYPE&cid=CLICK_ID

Replace these values:

  • TENANT_ID: your Tenant ID

  • CONVERSION_TYPE: the code for the conversion event (e.g., sale or signup)

  • CLICK_ID: the Trackdesk Click ID

Revenue share offers

To use revenue share for an offer with a dynamic payout, you must provide the specific revenue amount when creating the conversion. The system uses this value to calculate the respective commissions for both the network and the affiliate.

https://TENANT_ID.trackdesk.com/tracking/conversion/v1?conversionTypeCode=CONVERSION_TYPE&cid=CLICK_ID&amount.value=AMOUNT

Replace these values:

  • TENANT_ID: your Tenant ID

  • CONVERSION_TYPE: the code for the conversion event (e.g., sale or signup)

  • CLICK_ID: the Trackdesk Click ID

  • AMOUNT: the specific amount you want to send. The system will use this value to calculate both network and affiliate commissions. Write it without quotes in the URL (e.g., 100 for whole numbers or 100.50 for decimals).

Option B: POST postback

Fixed amount offers

To send a POST postback for an offer with a fixed amount, use the following postback to create a conversion:

POST https://TENANT_ID.trackdesk.com/tracking/conversion/v1

{
"conversionTypeCode": "CONVERSION_TYPE",
"cid": "CLICK_ID"
}

Replace these values:

  • TENANT_ID: your Tenant ID

  • CONVERSION_TYPE: the code for the conversion event (e.g., sale or signup)

  • CLICK_ID: the Trackdesk Click ID

Revenue share offers

To use revenue share for an offer with a dynamic payout, you must provide the specific revenue amount when creating the conversion. The system uses this value to calculate the respective commissions for both the network and the affiliate.

Endpoint URL and payload:

POST https://TENANT_ID.trackdesk.com/tracking/conversion/v1

{
"conversionTypeCode": "CONVERSION_TYPE",
"cid": "CLICK_ID",
"amount": {
"value": "AMOUNT"
}
}

Replace these values:

  • TENANT_ID: your Tenant ID

  • CONVERSION_TYPE: the code for the conversion event (e.g., sale or signup)

  • CLICK_ID: the Trackdesk Click ID

  • AMOUNT: the specific amount you want to send. The system will use this value to calculate both network and affiliate commissions. This value must be a string (e.g., "100" for whole numbers or "100.50" for decimals).

Step 3: Add extra parameters (optional)

You can attach up to 9 extra parameters to your conversion for more detailed tracking. (Tip: Use the builder tool in our API documentation to help generate your customized postback link.)

Adv S1 to Adv S5

There are five parameters available for general use. Use the following format to add them to your postback (see the example for the Adv S1 parameter below):

GET format

customParams.advS1=VALUE

POST format

"customParams": {
"advS1": "VALUE"
}

Customer ID

General parameter for any information. Use the following format to add this parameter to the postback.

GET format

customerId=CUSTOMER_ID

POST format

"customerId": "CUSTOMER_ID"

External ID

Parameter used for deduplication. Only one conversion per Conversion Type can have the same External ID (for Network accounts, per Conversion Type and Revenue Origin), so a duplicate request does not create a second conversion. Usually an Order ID or another internal ID that uniquely identifies the transaction is used.

GET format

externalId=EXTERNAL_ID

POST format

"externalId": "EXTERNAL_ID"

Currency

Parameter used to specify the currency for the conversion. This parameter can be used only for cases with revenue share.

GET format

currency.code=CURRENCY_CODE

POST format

"currency": {
"code": "CURRENCY_CODE"
}

Status

Parameter used to specify the conversion status that the conversion will be created with.

GET format

status=VALUE

POST format

"status": "VALUE"


​

Step 4: Refund handling (optional)

Refunds can be handled automatically via an API request. This is initiated by a webhook on your side that triggers when an order's status changes to "refunded".

To make this work, you must include the External ID when creating the initial conversion (see External ID in Step 3). This unique identifier is required to track and update the status of specific records.

When the refund webhook is triggered, it must include the Order ID or Charge ID that matches the External ID saved on the original conversion. This ensures the records are correctly paired for the update.

If you prefer not to automate this part, it can be safely skipped. However, keep in mind that if a commission is attributed and later refunded, you will ideally want to reverse the affiliate commission.

Endpoint URL and request payload:

POST https://TENANT_ID.trackdesk.com/api/node/conversions/v1/update-status-by-external-id

{
"revenueOriginId": "REVENUE_ORIGIN_ID",
"externalId": "EXTERNAL_ID",
"conversionTypeCode": "CONVERSION_TYPE",
"status": "CONVERSION_STATUS_REFUNDED"
}

Replace these values:

  • TENANT_ID: your Tenant ID

  • REVENUE_ORIGIN_ID: your Revenue Origin ID

  • EXTERNAL_ID: the charge ID or order ID of the refunded payment (the External ID of the original conversion)

  • CONVERSION_TYPE: the code for the conversion event (e.g., sale)

Did this answer your question?