Skip to main content
Sanity → AttentiveIntegration guide

Connecting Sanity to Attentive

Sanity is a headless content platform, which means like every headless CMS it holds no commercial record and the tracking question lives elsewhere. Attentive is SMS, where the identifier is a phone number, the consent rules are legal rather than advisory, and a mistake reaches the customer's pocket within seconds. The join between them succeeds or fails on one thing: whether the subscriber's phone number reaches the front-end conversion, not a Sanity record before the conversion happens, because Attentive can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Attentive on a Sanity site: the SMS consent text is now CMS content

Sanity supplies copy and links, not conversions; purchases and phone numbers come from your order system. Keep Attentive's consent disclosure out of editable Sanity text, rendered by Attentive's unit or locked for legal. Make sure sign-up units react to client-side route changes, and check scheduled campaign links or redirect old slugs whenever editors rename them.

Teams on Sanity often move the copy around Attentive sign-up units into the CMS: the offer, the button, and sometimes the consent disclosure. That turns the disclosure into an editable field. A marketer shortening the legal text for a mobile layout changes the wording subscribers agree to, and unless someone checks document history, nobody can say which version a given subscriber saw. Keep the disclosure out of free text: let Attentive's own sign-up unit render it, or lock it in a separate document only legal can edit.

Attentive's tag also has to follow client-side navigation. A sign-up unit targeted at certain URLs will not react when Next.js changes the route without a page load, so units appear on the first page someone lands on and never again. Test targeting by clicking through the site, not by loading each URL directly.

Purchases and the phone numbers they are keyed on come from your order system, not Sanity. What Sanity does supply is the destination of every link in a text. A scheduled campaign pointing at a collection page whose slug an editor changed sends thousands of people to a 404 within seconds of sending. Check scheduled campaign links whenever slugs change, or redirect old slugs in the front end.

Sanity → Attentive · what breaks

Why this join usually fails — Sanity → Attentive

  1. 01

    The subscriber's phone number 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

    Consent state treated as a tracking detail rather than a legal one

    Sending an event is not the same as being allowed to message the person it describes. US SMS marketing is governed by express written consent requirements with statutory damages per message, and "the integration sent it" is not a defence. Consent state has to be checked at send time, in Attentive, not inferred from the fact that an event arrived.

  4. 04

    Nothing reconciles afterwards

    Attentive shows the event on the subscriber record and the journey it triggered. Check the subscriber's consent status alongside, because that is the field that decides whether anything should have happened.

Sanity → Attentive · the fix

What working looks like — Sanity → Attentive

  • The subscriber's phone number on every conversion

  • Conversions arriving in Attentive

    The event lands on the subscriber, triggers the journeys that depend on it, and becomes available for segmentation.

  • Reconciled against the source

Sanity → Attentive · architecture

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

    Attentive needs a click to match

    Attentive needs the subscriber's phone number, the event name and its properties. It also needs the subscriber to have consented — an event about someone who never opted in cannot legally be messaged, whatever the event says.

  3. 3

    The identifier is the bridge

    The subscriber's phone number, 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

    Attentive does not deduplicate for you. A purchase sent twice can trigger a journey twice, and the customer receives two texts. Unlike an email, a duplicate SMS costs you money per send and irritates the recipient measurably more.

Sanity → Attentive · normal or broken

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

Normal, not a fault

  • The subscriber's phone number present on the conversion

  • Sent from your commerce or CRM system

  • Deduplicated correctly

    Attentive does not deduplicate for you. A purchase sent twice can trigger a journey twice, and the customer receives two texts. Unlike an email, a duplicate SMS costs you money per send and irritates the recipient measurably more.

  • Reconciles with the source

Actually broken

  • The subscriber's phone number 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

    Sending an event is not the same as being allowed to message the person it describes. US SMS marketing is governed by express written consent requirements with statutory damages per message, and "the integration sent it" is not a defence. Consent state has to be checked at send time, in Attentive, not inferred from the fact that an event arrived.

  • Nobody has reconciled it

Sanity → Attentive · diagnose

Diagnostic order — Sanity → Attentive

  1. 01

    Count conversions carrying the subscriber's phone number

  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

    Verify that events for non-consented customers cannot trigger a send

    Check the journey's entry conditions, not the event pipeline. The pipeline will happily deliver an event about someone who never opted in; the journey is what must refuse to act on it.

  5. 05

    Read the match rate, not the success message

    Attentive shows the event on the subscriber record and the journey it triggered. Check the subscriber's consent status alongside, because that is the field that decides whether anything should have happened.

Sanity → Attentive · prove

How it gets proven — Sanity → Attentive

Source of truth

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

  • The subscriber's phone number confirmed present on a live conversion.
  • Events confirmed on subscriber records with consent state verified, and a test proving a non-consented profile does not trigger a send.
  • The conversion confirmed sourced from the commerce system, with front-end routing verified separately.

Sanity → Attentive · free audit

What we check in the free audit

  • Count conversions carrying the subscriber's phone number
  • Follow one real conversion end to end
  • Identify the front-end framework, not the CMS
  • Verify that events for non-consented customers cannot trigger a send
  • 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 → Attentive · when not to buy

When you don't need this — Sanity → Attentive

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the subscriber's phone number.
  • There is no Sanity-specific build. Fix the front end and the commerce integration; the CMS is not in the path.
  • If you do not have a consented SMS list, the integration is the least of the work. Building the list compliantly comes first, and no event pipeline substitutes for it.

Sanity → Attentive · what we deliver

What gets built — Sanity → Attentive

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

    The Attentive events API, posted server-side from your order system with the subscriber's phone number and the event properties.

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

You can, but restrict who edits it and keep a record of what was live when. The disclosure is a legal record, not marketing copy.

Free · 30 min

Get Sanity and Attentive joined properly

Free30 minutesNo obligation