Skip to main content
Version: Current platform

Partner Attribution

Partner attribution keeps affiliate traffic evidence separate from authoritative order finance. It covers AWIN and CJ, which Upsurge connects to, and the networks you register for each site. Use the browser SDK for ordinary touch capture. Use the server endpoints when a trusted commerce backend owns purchase, refund, correction, and cancellation truth, or knows which network an order came from.

Results appear in Analytics under the Partner attribution data source.

Registered networks​

Register networks that Upsurge does not connect to in Settings → Partner attribution, or in settings.partner_attribution.networks through PATCH /sites/{siteId}. The request replaces the whole partner_attribution object, so send every setting you want to keep.

{
"partner_attribution": {
"mode": "advertiser",
"networks": [
{
"network_id": "impact",
"display_name": "Impact",
"click_parameter": "irclickid",
"partner_parameter": "irpid"
}
]
}
}
  • network_id is 2–32 lowercase letters, digits, or underscores, starting with a letter, and unique on the site. awin, cj, the traffic channel names (such as affiliate, email, and direct), product, overlay, recommendation, chatbot, and unattributed are reserved.
  • display_name is 1–64 characters. A site has at most 20 networks.
  • click_parameter and partner_parameter are optional landing-URL parameter names of 1–64 letters, digits, _, ., or -. partner_parameter needs click_parameter, the two must differ, neither can be awc or cjevent, and each click parameter is unique on the site, ignoring case.
  • provider on touches, voucher_mappings, and commission_rate_estimates accepts awin, cj, or a registered network_id. Saving refuses a voucher mapping or commission estimate whose network is not registered, so a network still in use cannot be removed.

Registered networks take inbound touches only, and never a provider_click_id. Upsurge does not submit their orders anywhere or check them against a report, so their orders are unverified. Editing a network affects future touches only; past orders keep the network they were credited to.

From SDK 3.2.0, the browser SDK captures registered networks' clicks itself. It does so when the landing URL carries the network's click_parameter and a partner: partner_parameter, or a voucher that an init voucher mapping assigns to the network. The touch it records has provider set to the network_id and no click value. Send its ID in the conversion's touch_ids, as for AWIN and CJ (see Orders from affiliate partners). A server can still send the touch itself in touches, with "provenance": "server".

Capture partner touches​

POST /api/v1/partner-attribution/touches accepts 1–20 canonical touches, further limited by the site configuration. Browser requests authenticate with an origin-bound runtime bearer token. During unload, the SDK may include runtime_token in the JSON body because the beacon API cannot set headers; that exception is accepted only on whitelisted ingestion routes.

{
"touches": [
{
"schema_version": 1,
"touch_id": "touch_awin_1",
"provider": "awin",
"direction": "inbound",
"provider_click_id": "3661_1358445475_f396d719f0b67247f126a90bd2898cf0",
"partner_id": "45628",
"landing_path": "/summer-sale",
"occurred_at": "2026-07-12T12:30:00Z",
"provenance": "browser_sdk"
}
]
}

A new touch returns 201. An unchanged replay returns 200; reusing a touch ID with different content returns 409. Raw awc and cjevent values are encrypted before persistence and never returned by this endpoint.

A touch for a provider the site has not registered returns 400, and so does a touch whose landing_path or referrer_url still contains a registered click_parameter (ignoring case). Remove the click parameter from those URLs before you send the touch; Upsurge never stores its value.

Ingest trusted conversions​

POST /api/v1/partner-attribution/conversions requires a secret key with partner_attribution:convert, and the key's site must use advertiser partner attribution. The request has one of three envelopes:

  • { "event_type": "purchase", "conversion": { ... } }
  • { "event_type": "adjustment", "adjustment": { ... } }
  • { "event_type": "cancellation", "cancellation": { ... } }
{
"event_type": "purchase",
"conversion": {
"schema_version": 1,
"idempotency_key": "wc:website-1:order-1001",
"website_id": "website-1",
"order_id": "1001",
"occurred_at": "2026-07-12T13:00:00Z",
"currency": "EUR",
"revenue": 129.99,
"commissionable_subtotal": 120,
"tax": 9.99,
"shipping": 0,
"discount": 0,
"lines": [
{
"line_id": "line-1",
"sku": "SHOE-1",
"quantity": 1,
"unit_price": 120,
"subtotal": 120,
"discount": 0,
"commissionable_amount": 120,
"item_cost": 68.5
}
],
"margin": { "amount": 51.5, "basis": "exact", "source": "order_costs" },
"touch_ids": ["touch_awin_1"],
"experiment_assignment_ids": ["peasg_abc123"]
}
}

touch_ids references touches already recorded for the site, such as the IDs that getPartnerTouches() returns in the browser. touches embeds up to 20 touches in the request. When your own systems know the network, embed its touch with "provenance": "server":

{
"schema_version": 1,
"touch_id": "impact-order-1001",
"provider": "impact",
"direction": "inbound",
"partner_id": "partner-42",
"landing_path": "/summer-sale",
"occurred_at": "2026-07-12T12:30:00Z",
"provenance": "server"
}

Order totals must reconcile with line values. Exact costs must cover every line, and exact margin must reconcile with net merchandise revenue. Adjustments require an earlier purchase in the same site and currency, cannot make revenue negative, and must advance the source timestamp. Cancellation must reverse the full remaining revenue and is terminal.

The first accepted request returns 201 and authoritative: true. Replaying the same idempotency key and payload returns the same IDs with 200 and deduplicated: true. A changed replay returns 409.

Credit and verification​

The most recent eligible click inside the site's attribution window gets the credit, across AWIN, CJ, and registered networks. An AWIN or CJ click carries its provider click ID; a registered network's click carries a partner_id. Earlier clicks from other partners are assists, and mapped vouchers count only when there is no eligible click.

Only AWIN and CJ orders are sent to a network: when the credited network is AWIN or CJ and the site has an active connection to it, Upsurge submits the order to that connection. When a registered network's click follows an AWIN or CJ click, the registered network gets the credit and AWIN or CJ receives no server-side submission for the order.

Each credited order has a verification state:

StateMeaning
pendingCredited to AWIN or CJ with a site connection; the network has not reported the order yet.
verifiedThe network's transaction report matched the order.
not_confirmedStill pending 7 days after the order, when the next completed sync covers it.
unverifiedCredited to a registered network, or to AWIN or CJ without a site connection.

Upsurge imports AWIN and CJ transactions hourly and re-reads the last 90 days nightly, so not_confirmed and unverified AWIN or CJ orders can still become verified. The network's own status (pending, approved, declined, cancelled) is separate: a declined order is still verified. GET /analytics/partners reports orders, revenue, commission, and partner contribution by verification state; see the endpoint catalog.

Observational browser purchases

A browser purchase sent to event tracking remains an analytics observation. It never replaces the trusted conversion record used for partner credit and verification.

Partner experience experiments​

Authenticated merchants manage experiments through /partner-experiments and read /partner-experiments/{experimentId}/results. The browser SDK uses its runtime capability at /partner-experiments/assignments to receive a stable control or treatment assignment before selected overlay, recommendation, or chatbot campaigns load.

Results use eligible sessions as the intent-to-treat denominator and report conversion, revenue/session, gross profit/session, and partner contribution/session with sample-ratio, power, late-conversion, refund, and cancellation states. They measure selected Upsurge experiences within eligible partner traffic; they do not claim a partner's total incrementality.

Publisher mode​

Publisher mode decorates allowlisted AWIN links with clickref and CJ links with sid. Automatic decoration is opt-in and only applies to explicitly marked links. Content, campaign, placement, creative, and destination context are captured separately from provider click IDs.

Mark automatic links with data-upsurge-partner-provider and data-upsurge-click-reference; optional taxonomy attributes are data-upsurge-partner-id, data-upsurge-campaign-id, data-upsurge-content-id, data-upsurge-placement-id, and data-upsurge-creative-id.

Publisher mode is configured on the site through the API (PATCH /sites/{siteId} with partner_attribution); Settings → Partner attribution only offers advertiser mode. Publisher mode, click IDs, and link decoration are available for AWIN and CJ only.

GET /analytics/publishers requires a merchant role that can read analytics and an active publisher-mode website. It returns Upsurge-observed clicks alongside provider-settled orders, commissionable revenue, approved/pending/declined commission, reversals, top content/destinations, and reference-correlation variance. Raw click references do not enter analytics facts.

Cookie settings

Choose what Upsurge may use on this site. You can change this any time from the footer.

  • Essential

    Keeps the site working and remembers your language.

    Always on
  • Analytics

    Helps us understand which pages and features people use.

  • Personalization

    Tailors content and recommendations to what you’re looking at.

  • Marketing

    Measures which campaigns bring people to the site.

Email support

Or write to hello@upsur.ge