Skip to main content
Craft → LinkedInIntegration guide

Connecting Craft CMS to LinkedIn Ads

Craft is a developer-oriented CMS, usually built bespoke by an agency, which means the implementation is whatever that agency decided and nothing is standard. 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 Craft Commerce order 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

Craft CMS to LinkedIn: send the lead form entry, not the cart

On Craft lead sites, send the form entry, not a cart. Capture li_fat_id into a first-party cookie, store it on the entry, and send the conversion to LinkedIn's Conversions API from the form plugin's submission event with hashed work email, sharing a server-generated event ID with the Insight Tag. Later, send CRM-qualified leads too.

Craft is a common choice for B2B companies, agencies, universities and manufacturers whose site is a brochure plus forms, and for those sites LinkedIn is often the main paid channel. The conversion is the form entry, not a Commerce order: demo requests, quote requests, gated downloads. Capture li_fat_id on landing into a first-party cookie, pass it with the form submission, store it on the entry, and send the conversion to the LinkedIn Conversions API from the form plugin's submission event in PHP, with hashed work email.

Do it server-side for a Craft-specific reason: a thank-you page served from static cache may not run the Insight Tag reliably, or may fire it again on reload. If you keep the Insight Tag conversion too, generate the event ID on the server, render it into the page uncached, and send the same ID to the API, or LinkedIn counts each lead twice at its cost per click.

Commerce orders belong on LinkedIn only when the store sells to businesses, such as trade accounts or parts ordering. A consumer Craft Commerce store should not feed LinkedIn at all. For lead sites, the second conversion worth sending is the qualified one from the CRM weeks later, because form fills are cheap and LinkedIn will otherwise optimize toward people who fill forms; check whether that later event still lands inside the conversion's window.

Craft → LinkedIn · what breaks

Why this join usually fails — Craft → LinkedIn

  1. 01

    The li_fat_id click identifier never reaches Craft

    Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.

  2. 02

    Every install is bespoke

    There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.

  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.

Craft → LinkedIn · the fix

What working looks like — Craft → LinkedIn

  • The li_fat_id click identifier on every order

  • 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

    Craft CMS's own records are the reference, not either dashboard.

Craft → LinkedIn · architecture

How Craft and LinkedIn actually connect

  1. 1

    Craft CMS holds the truth

    Craft installs are bespoke by nature. Establish how this particular build models a completed order before assuming anything transfers from another Craft site.

  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 Craft Commerce order.

  4. 4

    The event source decides reliability

    Fire from the event listener in PHP rather than a Twig template, which may be cached.

  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.

Craft → LinkedIn · normal or broken

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

Normal, not a fault

  • The li_fat_id click identifier present on the order

    Visible on the record itself in Craft CMS, not merely captured somewhere on the site.

  • Sent from the Craft Commerce order-complete event

  • 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

    LinkedIn's count and Craft CMS's records agree within a few percent over a closed window.

Actually broken

  • The li_fat_id click identifier missing on most records

    Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.

  • Sent from the browser

    There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.

  • 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

    The dashboard shows a number and no one has compared it to Craft CMS.

Craft → LinkedIn · diagnose

Diagnostic order — Craft → LinkedIn

  1. 01

    Count orders carrying the li_fat_id click identifier

  2. 02

    Follow one real conversion end to end

  3. 03

    Read how this specific build handles order completion

    Assumptions carried from another Craft project are the main source of wasted time here.

  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.

Craft → LinkedIn · prove

How it gets proven — Craft → LinkedIn

Against Craft CMS's own records, not against either platform's dashboard.

Source of truth

Craft Commerce's order records in your own database, filtered to completed.

  • The li_fat_id click identifier confirmed present on a live order.
  • Auto-tagging confirmed enabled, the conversion defined in Campaign Manager, and deduplication verified on a real conversion.
  • Order custom field confirmed populated on an order placed as an anonymous visitor through cache.

Craft → LinkedIn · free audit

What we check in the free audit

  • Count orders carrying the li_fat_id click identifier
  • Follow one real conversion end to end
  • Read how this specific build handles order completion
  • Confirm auto-tagging is on and the conversion is defined in Campaign Manager
  • Read the match rate, not the success message

Checked against

Craft Commerce's order records in your own database, filtered to completed.

Get my free conversion tracking audit

Free30 minutesNo obligation

Craft → LinkedIn · when not to buy

When you don't need this — Craft → LinkedIn

  • If LinkedIn already reports conversions that reconcile against Craft CMS's records within a few percent, this join is working and there is nothing to buy.
  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the li_fat_id click identifier.
  • If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
  • If you are not selling to businesses, LinkedIn's cost per click is very hard to justify and no measurement work changes that arithmetic.

Craft → LinkedIn · what we deliver

What gets built — Craft → LinkedIn

  • Identifier capture into Craft

    Capture the identifier and store it as a custom field on the order through a Craft event listener, server-side.

  • Event source: the Craft Commerce order-complete event

    Fire from the event listener in PHP rather than a Twig template, which may be cached.

  • 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

    Refunds and cancelled orders are recorded against the order.

Written guarantee

95%+ tracking accuracy

Measured against Craft Commerce's order records in your own database, filtered to completed.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Craft → LinkedIn questions, answered

Hook the form plugin's submission event in a Craft module, read the li_fat_id stored from the landing URL, and send it with hashed email to a conversion defined in Campaign Manager. Don't rely on a cached thank-you page.

Free · 30 min

Get Craft and LinkedIn joined properly

Free30 minutesNo obligation