Skip to main content
Sanity → PartnerStackIntegration guide

Connecting Sanity to PartnerStack

Sanity is a headless content platform, which means like every headless CMS it holds no commercial record and the tracking question lives elsewhere. PartnerStack commissions partners on recurring subscription revenue rather than on a single order, which makes it the one destination here where a conversion you send creates a payment obligation that repeats every month. The join between them succeeds or fails on one thing: whether the PartnerStack referral key reaches the front-end conversion, not a Sanity record before the conversion happens, because PartnerStack can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

PartnerStack on a Sanity marketing site: carry the key to the app

Scope the PartnerStack referral key cookie to the parent domain, or pass it on the sign-up link, so the app subdomain sees it when customers sign up. Render Sanity partner-page CTAs through a component that appends the key. Report revenue from billing with customer identifier and recurring revenue, and source Sanity pricing from billing to avoid disputes.

SaaS companies commonly run the marketing site on Sanity and a framework like Next.js on the www domain, and the product on an app subdomain. The PartnerStack referral key is captured where the partner's link lands, the marketing site, but sign-up happens in the app. If the cookie holding it is scoped to www only, the app never sees it and the customer is created without a partner. Scope it to the parent domain or pass it explicitly on the sign-up link.

Co-branded partner pages built as Sanity documents must keep the key on every call to action. A page whose buttons are hand-entered URLs in Portable Text drops it the first time an editor updates a link. Render CTAs through a component that appends the key from the cookie.

Revenue reporting comes from billing, with the customer identifier and recurring revenue as it is recognized. Sanity matters for one more reason: pricing pages. If plan names and prices on the Sanity pricing page are typed in rather than pulled from billing, partners promote prices billing does not charge, and commission disputes start from that gap. Source pricing from billing or sync it.

Sanity → PartnerStack · what breaks

Why this join usually fails — Sanity → PartnerStack

  1. 01

    The PartnerStack referral key 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 commission that recurs on revenue that stopped

    The mirror of the usual problem. If cancellations are not reported back, partners keep earning on subscriptions that churned months ago. Every conversion pipeline needs reversals; this one needs them because real money leaves the building otherwise.

  4. 04

    Nothing reconciles afterwards

    PartnerStack shows attributed customers and accruing commission per partner. Reconcile the commissionable revenue against your billing system's active subscriptions, not against its historical sales.

Sanity → PartnerStack · the fix

What working looks like — Sanity → PartnerStack

  • The PartnerStack referral key on every conversion

  • Conversions arriving in PartnerStack

    The customer is attributed to a partner, and commission accrues against the recognized revenue on the schedule you configured.

  • Reconciled against the source

Sanity → PartnerStack · architecture

How Sanity and PartnerStack 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

    PartnerStack needs a click to match

    PartnerStack needs the referral key, the customer identifier and the subscription value. Recurring commission also needs the ongoing revenue reported, not just the first payment.

  3. 3

    The identifier is the bridge

    The PartnerStack referral key, 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

    Deduplication is on your customer identifier. Reporting the same subscription twice creates two commissionable relationships against one paying customer, and the error compounds monthly rather than once.

Sanity → PartnerStack · normal or broken

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

Normal, not a fault

  • The PartnerStack referral key present on the conversion

  • Sent from your commerce or CRM system

  • Deduplicated correctly

    Deduplication is on your customer identifier. Reporting the same subscription twice creates two commissionable relationships against one paying customer, and the error compounds monthly rather than once.

  • Reconciles with the source

Actually broken

  • The PartnerStack referral key 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

    The mirror of the usual problem. If cancellations are not reported back, partners keep earning on subscriptions that churned months ago. Every conversion pipeline needs reversals; this one needs them because real money leaves the building otherwise.

  • Nobody has reconciled it

Sanity → PartnerStack · diagnose

Diagnostic order — Sanity → PartnerStack

  1. 01

    Count conversions carrying the PartnerStack referral key

  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

    Check whether churn events reach PartnerStack at all

    In most implementations the new-subscription path was built and the cancellation path was not, because only one of them is exciting.

  5. 05

    Read the match rate, not the success message

    PartnerStack shows attributed customers and accruing commission per partner. Reconcile the commissionable revenue against your billing system's active subscriptions, not against its historical sales.

Sanity → PartnerStack · prove

How it gets proven — Sanity → PartnerStack

Source of truth

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

  • The PartnerStack referral key confirmed present on a live conversion.
  • Commissionable recurring revenue reconciled against active subscriptions in billing, with cancellations proven to reverse.
  • The conversion confirmed sourced from the commerce system, with front-end routing verified separately.

Sanity → PartnerStack · free audit

What we check in the free audit

  • Count conversions carrying the PartnerStack referral key
  • Follow one real conversion end to end
  • Identify the front-end framework, not the CMS
  • Check whether churn events reach PartnerStack at all
  • 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 → PartnerStack · when not to buy

When you don't need this — Sanity → PartnerStack

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the PartnerStack referral key.
  • There is no Sanity-specific build. Fix the front end and the commerce integration; the CMS is not in the path.
  • If you run no partner or affiliate programme, there is nothing to send here. If you run one on one-off sales rather than subscriptions, the recurring-commission complexity does not apply to you.

Sanity → PartnerStack · what we deliver

What gets built — Sanity → PartnerStack

  • 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 PartnerStack

    Server-side reporting from your billing system, with the referral key, customer identifier and the recurring revenue as it is recognized.

  • 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 → PartnerStack questions, answered

The referral cookie is set on the marketing subdomain only. Scope it to the parent domain or pass the key on the sign-up link.

Free · 30 min

Get Sanity and PartnerStack joined properly

Free30 minutesNo obligation