Guide

Postback Setup

Postback profiles let you define exactly how conversion data maps from an affiliate network back to clicksdk — per-parameter key renaming, fixed and fallback default values, and reusable profile templates.

What is a postback profile?

A postback profile is a named configuration that describes how your affiliate network sends conversion data to clicksdk. Instead of wiring up raw query parameters on every link, you create the profile once and attach it to as many links as you like.

Profiles are managed in Admin → Settings → Postback Profiles. Once created, a profile appears in the Postback tab of every link editor.

Creating a postback profile

  1. Go to Admin → Settings → Postback Profiles and click New profile.
  2. Give the profile a name that identifies the network or campaign (e.g. MaxBounty — Lead).
  3. Map each parameter — choose the key name the network will use and optionally hardcode a value. clicksdk generates a unique postback URL for the profile based on your mappings.
  4. Copy the generated postback URL and paste it into your affiliate network's postback / conversion pixel settings.
  5. Save the profile and attach it to one or more links.

Supported parameters

The following parameters can be received from your affiliate network. Each one can be renamed to match whatever query-string key the network uses, or hardcoded to a fixed value.

ParameterMacroDescription
click_idrequired{CLICK_ID}The unique ID clicksdk assigned to the originating click. Used to tie the conversion back to the correct visitor.
payout{PAYOUT}Decimal commission amount for this conversion (e.g. 12.50).
currency{CURRENCY}ISO 4217 currency code (e.g. USD, EUR).
total{TOTAL}Total order value including tax and shipping.
subtotal{SUBTOTAL}Order subtotal before tax and shipping.
order_id{ORDER_ID}The network's order or transaction reference ID.
event_type{EVENT_TYPE}Conversion event category — e.g. purchase, lead, signup, install.

Renaming parameters

Every affiliate network uses different query-string key names for the same data. In the profile editor you choose what key name each data field should use in the generated postback URL. clicksdk then builds the URL for you and you give it to the network.

For example, map payout to the key earning and currency to cur. clicksdk generates:

https://api.clicksdk.com/postback?click_id={CLICK_ID}&earning={PAYOUT}&cur={CURRENCY}

Paste this URL into the network's postback settings. The network replaces the macros (e.g. {PAYOUT}) with real values when it fires the postback. clicksdk reads those values back using the key names you defined.

clicksdk data fieldKey in generated URL
payoutearning
currencycur

Default values

Each parameter row in the profile editor has a Default Value field. How that value behaves depends on whether you wrap it in curly braces or not.

Default value enteredBehaviour
{USD} (curly braces)Fallback. The network can override this. If the network sends a non-empty, valid value for the parameter, that value is used. If the network sends nothing or an invalid value, USD is used instead.
USD (no curly braces)Fixed. The value is always USD, regardless of what the network sends. The network cannot override it.
emptyNo default. If the network omits the parameter, the field is recorded as empty.

Examples:

  • currency = {USD}— uses USD if the network doesn't send a currency, but the network can supply a different code (e.g. GBP) and it will be recorded.
  • currency = USD — always USD; a currency value from the network is ignored.
  • event_type = purchase — hardcodes the event type for every conversion on this profile.
Use a fixed value (no curly braces) when you need to guarantee a value is always correct — for example, locking the event_type on a lead-only profile. Use a fallback value (curly braces) when you want a sensible default but still allow the network to send the real value.

Attaching a profile to a link

Open any link in the link editor and switch to the Postbacktab. Use the dropdown to select a saved profile. The profile's parameter mappings apply immediately — no further configuration is needed on the link itself.

You can override the profile for a specific link by switching to Custommode, which copies the selected profile's settings as a starting point.

Full example

A purchase campaign where the network uses non-standard key names, the currency should default to USD (but the network can override it), and the event type is always fixed to purchase:

# Profile: "PartnerStack — Purchase"

Parameter mappings:
  click_id   → tid        key renamed
  payout     → earning    key renamed
  currency   → cur        key renamed, default: {USD}   ← fallback, network can override
  order_id   → oid        key renamed
  event_type → ev         key renamed, default: purchase ← fixed, network cannot override
  total      → (not configured)
  subtotal   → (not configured)

clicksdk generates the following postback URL for the profile:

https://api.clicksdk.com/postback?tid={CLICK_ID}&earning={PAYOUT}&cur={CURRENCY}&oid={ORDER_ID}&ev={EVENT_TYPE}

Paste this URL into PartnerStack. When a sale fires the postback, clicksdk records a conversion with event_type = purchase (always), currency taken from the network or falling back to USD, and the payout and order ID from the network.