Skip to main content
Sanity → LinkedInIntegration guide

Connecting Sanity to LinkedIn Ads

Sanity is a headless content platform, which means like every headless CMS it holds no commercial record and the tracking question lives elsewhere. LinkedIn is where B2B advertisers pay the highest cost per click in the industry, which makes an unmeasured conversion more expensive here than almost anywhere. The join between them succeeds or fails on one thing: whether the li_fat_id click identifier reaches the front-end conversion, not a Sanity record before the conversion happens, because LinkedIn can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Sanity B2B sites: LinkedIn conversions without page reloads

Fire LinkedIn event-specific conversions from the form success handler with the Insight Tag track call, not thank-you URLs, sharing an event ID with the server send. Set li_fat_id as a first-party cookie from middleware and carry it into the CRM, then send demos or opportunities through the Conversions API with hashed work email. Tag the shared form component.

Sanity is a common CMS for B2B and SaaS marketing sites, which is exactly LinkedIn's audience. The usual break is routing: a LinkedIn conversion defined by a thank-you URL depends on a page load, and a Next.js or similar front end changes routes without one. Use event-specific conversions fired from the form's success handler with the Insight Tag's track call, and pass an event identifier that the server send will reuse.

Capture li_fat_id in the front end's middleware on the first request and set it as a first-party cookie from the server, then carry it into the CRM or the trial signup record. The conversion LinkedIn should optimize toward is a demo booked or opportunity created in the CRM, sent through the Conversions API with the hashed work email. For SaaS trials, the paid conversion lives in billing; Sanity is nowhere in that path.

The Sanity-specific risk is editorial. Marketers spin up new landing pages in Sanity Studio without a developer, and any page built from a block that does not include the tracking component sends nothing. Put the LinkedIn calls in the shared form component and page template, not in individual pages, so new pages inherit them.

Sanity → LinkedIn · what breaks

Why this join usually fails — Sanity → LinkedIn

  1. 01

    The li_fat_id click identifier 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

    Long B2B cycles against LinkedIn's windows

    LinkedIn's attribution windows are configurable and finite, while B2B deals close in quarters. A conversion that matters commercially frequently falls outside the window that LinkedIn will credit, and that gap has to be reported rather than argued about.

  4. 04

    Nothing reconciles afterwards

    Campaign Manager reports conversions against each defined conversion action with its own window. A successful API call is not a matched conversion — reconcile LinkedIn's reported conversions against your CRM for the same window, and expect a gap wherever your sales cycle exceeds the attribution setting.

Sanity → LinkedIn · the fix

What working looks like — Sanity → LinkedIn

  • The li_fat_id click identifier on every conversion

  • Conversions arriving in LinkedIn

    Conversions appear in Campaign Manager against the campaign, with the value you sent, and feed LinkedIn's optimization and its company-level reporting.

  • Reconciled against the source

Sanity → LinkedIn · architecture

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

    LinkedIn Ads needs a click to match

    LinkedIn matches server events on the click identifier where present and hashed user data otherwise. Conversions have to be defined in Campaign Manager before anything can be sent against them, and the definition includes the attribution window and counting rule.

  3. 3

    The identifier is the bridge

    The li_fat_id click identifier, 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

    LinkedIn deduplicates on an event identifier shared between the Insight Tag and the Conversions API. Running both without pairing them doubles every conversion, which on LinkedIn's cost per click is an expensive error to leave running.

Sanity → LinkedIn · normal or broken

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

Normal, not a fault

  • The li_fat_id click identifier present on the conversion

  • Sent from your commerce or CRM system

  • Deduplicated correctly

    LinkedIn deduplicates on an event identifier shared between the Insight Tag and the Conversions API. Running both without pairing them doubles every conversion, which on LinkedIn's cost per click is an expensive error to leave running.

  • Reconciles with the source

Actually broken

  • The li_fat_id click identifier 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

    LinkedIn's attribution windows are configurable and finite, while B2B deals close in quarters. A conversion that matters commercially frequently falls outside the window that LinkedIn will credit, and that gap has to be reported rather than argued about.

  • Nobody has reconciled it

Sanity → LinkedIn · diagnose

Diagnostic order — Sanity → LinkedIn

  1. 01

    Count conversions carrying the li_fat_id click identifier

  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

    Confirm auto-tagging is on and the conversion is defined in Campaign Manager

    Two settings, both easy to miss, and either one missing means nothing matches.

  5. 05

    Read the match rate, not the success message

    Campaign Manager reports conversions against each defined conversion action with its own window. A successful API call is not a matched conversion — reconcile LinkedIn's reported conversions against your CRM for the same window, and expect a gap wherever your sales cycle exceeds the attribution setting.

Sanity → LinkedIn · prove

How it gets proven — Sanity → LinkedIn

Source of truth

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

  • The li_fat_id click identifier confirmed present on a live conversion.
  • Auto-tagging confirmed enabled, the conversion defined in Campaign Manager, and deduplication verified on a real conversion.
  • The conversion confirmed sourced from the commerce system, with front-end routing verified separately.

Sanity → LinkedIn · free audit

What we check in the free audit

  • Count conversions carrying the li_fat_id click identifier
  • Follow one real conversion end to end
  • Identify the front-end framework, not the CMS
  • Confirm auto-tagging is on and the conversion is defined in Campaign Manager
  • 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 → LinkedIn · when not to buy

When you don't need this — Sanity → LinkedIn

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the li_fat_id click identifier.
  • There is no Sanity-specific build. Fix the front end and the commerce integration; the CMS is not in the path.
  • If you are not selling to businesses, LinkedIn's cost per click is very hard to justify and no measurement work changes that arithmetic.

Sanity → LinkedIn · what we deliver

What gets built — Sanity → LinkedIn

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

    Server events to the LinkedIn Conversions API with the click identifier, hashed user data and a matched event identifier.

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

URL-based conversions need a page load, and client-side routing does not produce one. Fire event-specific conversions from the form success handler instead.

Free · 30 min

Get Sanity and LinkedIn joined properly

Free30 minutesNo obligation