Skip to main content
Sanity → ImpactIntegration guide

Connecting Sanity to Impact.com

Sanity is a headless content platform, which means like every headless CMS it holds no commercial record and the tracking question lives elsewhere. Impact is the first destination on this site that pays somebody for the conversion you send it, which changes the stakes completely: an event that is wrong here does not distort a report, it produces a payment. The join between them succeeds or fails on one thing: whether the Impact click identifier, irclickid reaches the front-end conversion, not a Sanity record before the conversion happens, because Impact can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Impact partners on a Sanity site: links, promo codes, irclickid

Capture irclickid in front-end middleware into a first-party cookie, write it onto the commerce cart or order, and post the conversion server-side with order ID and value. Partner pages built in Sanity with promo codes create a second attribution path, so set Impact's rule and record both, and validate published codes against the commerce platform.

Brands on Sanity often build partner and creator pages as a document type: partner name, photo, offer text and a promo code. Showing a code on the page creates two attribution paths, irclickid from the click and the code typed at checkout. When partner A's link brings the visitor and partner B's code is used at checkout, Impact needs a rule for who earns it. Decide that in your Impact program settings and make the order carry both values, or the dispute lands on you with no record to settle it.

Capture irclickid in the front-end app's middleware into a first-party cookie, write it onto the cart or order in the commerce platform, and post the conversion server-side with the order ID and value. Impact's browser tag on a client-routed Sanity front end needs to run on route changes, not only on first load, if you keep it as a backup.

Codes published in Sanity must exist in commerce. An editor can publish a partner page with a code nobody created at checkout, and the customer abandons with the partner blamed. Add a validation step, a custom Sanity validation rule or a check before publish, that looks the code up in the commerce platform.

Sanity → Impact · what breaks

Why this join usually fails — Sanity → Impact

  1. 01

    The Impact click identifier, irclickid never reaches Sanity

    The front-end application does the routing, the caching and the identifier capture. Single-page navigation is the usual failure and it belongs to the framework rather than to Sanity.

  2. 02

    A headless stack diagnosed at the wrong layer

    Route changes not tracked, identifiers lost between pages — these are front-end framework problems that get filed against the CMS because that is the name everyone knows.

  3. 03

    A second party claiming a conversion your ads already paid for

    This is the structural problem with every affiliate and partnership platform. A customer clicks a paid ad, browses, later clicks a partner link for a discount code, and buys. Google reports a conversion, Impact commissions a partner, and you paid twice for one order. Neither system is wrong on its own terms — but nothing reconciles them unless you do.

  4. 04

    Nothing reconciles afterwards

    Impact shows the conversion in its reporting with the attributed partner and the commission. Check that the order ID matches your own record and that the value is net of what you actually keep, not the gross basket.

Sanity → Impact · the fix

What working looks like — Sanity → Impact

  • The Impact click identifier, irclickid on every conversion

  • Conversions arriving in Impact

    The conversion is attributed to a partner, held for your review or approval period, and then commissioned.

  • Reconciled against the source

Sanity → Impact · architecture

How Sanity and Impact actually connect

  1. 1

    Sanity holds the truth

    Sanity's real-time content APIs make it excellent at what it does and irrelevant to conversion measurement. Establishing that early saves the client money.

  2. 2

    Impact.com needs a click to match

    Impact needs the click identifier, an order identifier and the order value to attribute and commission the conversion. Without the click identifier it cannot tell which partner to pay.

  3. 3

    The identifier is the bridge

    The Impact click identifier, irclickid, captured at the visit and carried into the front-end conversion, not a Sanity record.

  4. 4

    The event source decides reliability

    Send from wherever the money is recorded, not from the content layer.

  5. 5

    Deduplication at the destination

    Impact deduplicates on your order identifier, so the same order sent twice will not commission twice — provided you send a stable order ID. Send a new ID for a retry and you have paid a partner twice for one sale.

Sanity → Impact · normal or broken

Working vs. broken, side by side — Sanity → Impact

Normal, not a fault

  • The Impact click identifier, irclickid present on the conversion

  • Sent from your commerce or CRM system

  • Deduplicated correctly

    Impact deduplicates on your order identifier, so the same order sent twice will not commission twice — provided you send a stable order ID. Send a new ID for a retry and you have paid a partner twice for one sale.

  • Reconciles with the source

Actually broken

  • The Impact click identifier, irclickid missing on most records

    The front-end application does the routing, the caching and the identifier capture. Single-page navigation is the usual failure and it belongs to the framework rather than to Sanity.

  • Sent from the browser

    Route changes not tracked, identifiers lost between pages — these are front-end framework problems that get filed against the CMS because that is the name everyone knows.

  • Counted twice, or not at all

    This is the structural problem with every affiliate and partnership platform. A customer clicks a paid ad, browses, later clicks a partner link for a discount code, and buys. Google reports a conversion, Impact commissions a partner, and you paid twice for one order. Neither system is wrong on its own terms — but nothing reconciles them unless you do.

  • Nobody has reconciled it

Sanity → Impact · diagnose

Diagnostic order — Sanity → Impact

  1. 01

    Count conversions carrying the Impact click identifier, irclickid

  2. 02

    Follow one real conversion end to end

  3. 03

    Identify the front-end framework, not the CMS

    The routing behaviour that breaks tracking belongs to Next.js, Nuxt or whatever renders the site.

  4. 04

    Count orders that appear in both your ad platforms and Impact

    The overlap is what you are paying for twice. It is a single query against order IDs and it is almost never run.

  5. 05

    Read the match rate, not the success message

    Impact shows the conversion in its reporting with the attributed partner and the commission. Check that the order ID matches your own record and that the value is net of what you actually keep, not the gross basket.

Sanity → Impact · prove

How it gets proven — Sanity → Impact

Source of truth

Your commerce, CRM or billing system — Sanity has no orders and no customers.

  • The Impact click identifier, irclickid confirmed present on a live conversion.
  • Conversions in Impact reconciled per order ID against your own order records, with the ad-platform overlap measured and stated.
  • The conversion confirmed sourced from the commerce system, with front-end routing verified separately.

Sanity → Impact · free audit

What we check in the free audit

  • Count conversions carrying the Impact click identifier, irclickid
  • Follow one real conversion end to end
  • Identify the front-end framework, not the CMS
  • Count orders that appear in both your ad platforms and Impact
  • Read the match rate, not the success message

Checked against

Your commerce, CRM or billing system — Sanity has no orders and no customers.

Get my free conversion tracking audit

Free30 minutesNo obligation

Sanity → Impact · when not to buy

When you don't need this — Sanity → Impact

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the Impact click identifier, irclickid.
  • There is no Sanity-specific build. Fix the front end and the commerce integration; the CMS is not in the path.
  • If you have no partner programme, there is nothing to send here. If you have one and are not reconciling the overlap with paid media, that reconciliation is worth more than any tracking build.

Sanity → Impact · what we deliver

What gets built — Sanity → Impact

  • Identifier capture into Sanity

    Capture and persist the identifier server-side in the front-end application, then carry it into the system that records the sale.

  • Event source: your commerce or CRM system

    Send from wherever the money is recorded, not from the content layer.

  • Dispatch to Impact

    The Impact Conversions API, posted server-side from your order system with the click identifier, order ID and value.

  • Reversals where they exist

    Handled by the commerce system.

Written guarantee

95%+ tracking accuracy

Measured against Your commerce, CRM or billing system — Sanity has no orders and no customers.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Sanity → Impact questions, answered

Read irclickid in middleware into a first-party cookie, attach it to the order, and post the conversion from your commerce system with the order ID.

Free · 30 min

Get Sanity and Impact joined properly

Free30 minutesNo obligation