Skip to main content
Craft → KlaviyoIntegration guide

Connecting Craft CMS to Klaviyo

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. Klaviyo drives the flows, so an event it never receives is a flow that never triggers and revenue that never happens. The join between them succeeds or fails on one thing: whether the profile identity — email or phone reaches the Craft Commerce order before the conversion happens, because Klaviyo can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Craft Commerce to Klaviyo: one Placed Order source, fired from PHP

Fire Placed Order from the Craft Commerce order-complete listener with the order number as unique ID, total, currency, line items and customer email, from one documented source only. Identify server-side once the cart gets an email and send Started Checkout from the cart update. Set Klaviyo consent from an explicit checkbox stored on the order.

Klaviyo's built-in integrations cover the big hosted and plugin platforms, and Craft Commerce gets whatever its build provides. That means Placed Order, the Started Checkout event abandoned-cart flows rely on, and the profile itself are all custom. Fire Placed Order from the Commerce order-complete listener with the order number as the event's unique ID (confirm how Klaviyo's Events API treats repeated IDs), order total, currency and line items, and the customer's email as the profile identifier.

Before building, check the Craft plugin store for a Klaviyo connector that supports your Craft and Commerce versions, and check whether a previous agency already installed one. Craft sites regularly end up with a plugin sending Placed Order and a custom module sending it again, and every post-purchase flow then fires twice. One source, documented in the repo.

The failure specific to Craft is abandoned-cart flows built on browser identification. If Klaviyo's onsite script or a Twig-rendered identify call sits on a statically cached page, Klaviyo never learns who the visitor is and Started Checkout never fires. Identify server-side the moment the cart gets an email address and send Started Checkout from the cart update, not from a template. Consent should come from an explicit checkbox stored on the order; set Klaviyo email and SMS consent from that field, never from the fact that someone bought.

Craft → Klaviyo · what breaks

Why this join usually fails — Craft → Klaviyo

  1. 01

    The profile identity — email or phone 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

    Duplicate events trigger duplicate emails

    Unlike an ad platform, a duplicate here is visible to your customer. Two order confirmations for one order is a support ticket, not a reporting discrepancy.

  4. 04

    Nothing reconciles afterwards

    Klaviyo shows the event on the profile's activity feed within moments. Check the profile, not the API response — and specifically check whether the same metric is arriving twice from two sources.

Craft → Klaviyo · the fix

What working looks like — Craft → Klaviyo

  • The profile identity — email or phone on every order

  • Conversions arriving in Klaviyo

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

  • Reconciled against the source

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

Craft → Klaviyo · architecture

How Craft and Klaviyo 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

    Klaviyo needs a click to match

    Klaviyo needs to resolve the event to a profile. Given an email it will create or update; given nothing it discards the event.

  3. 3

    The identifier is the bridge

    The profile identity — email or phone, 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

    Klaviyo does not deduplicate events for you. Sending the same purchase from both the store integration and your own server produces two events, two flow triggers and potentially two emails to a customer who bought once.

Craft → Klaviyo · normal or broken

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

Normal, not a fault

  • The profile identity — email or phone 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

    Klaviyo does not deduplicate events for you. Sending the same purchase from both the store integration and your own server produces two events, two flow triggers and potentially two emails to a customer who bought once.

  • Reconciles with the source

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

Actually broken

  • The profile identity — email or phone 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

    Unlike an ad platform, a duplicate here is visible to your customer. Two order confirmations for one order is a support ticket, not a reporting discrepancy.

  • Nobody has reconciled it

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

Craft → Klaviyo · diagnose

Diagnostic order — Craft → Klaviyo

  1. 01

    Count orders carrying the profile identity — email or phone

  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

    Open the profile's activity feed after a test event

    One event or two? Check whether the native store integration is already sending the same metric before you add a second source.

  5. 05

    Read the match rate, not the success message

    Klaviyo shows the event on the profile's activity feed within moments. Check the profile, not the API response — and specifically check whether the same metric is arriving twice from two sources.

Craft → Klaviyo · prove

How it gets proven — Craft → Klaviyo

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 profile identity — email or phone confirmed present on a live order.
  • The profile activity feed confirmed to show one event per conversion, with no overlap against the native integration.
  • Order custom field confirmed populated on an order placed as an anonymous visitor through cache.

Craft → Klaviyo · free audit

What we check in the free audit

  • Count orders carrying the profile identity — email or phone
  • Follow one real conversion end to end
  • Read how this specific build handles order completion
  • Open the profile's activity feed after a test event
  • 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 → Klaviyo · when not to buy

When you don't need this — Craft → Klaviyo

  • If Klaviyo 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 profile identity — email or phone.
  • If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
  • If Klaviyo's native store integration already sends the events your flows need, adding a second source creates duplicates rather than value.

Craft → Klaviyo · what we deliver

What gets built — Craft → Klaviyo

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

    The Klaviyo Events API with the profile identifiers and the event properties, sent server-side.

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

Not in the one-click way it does with Shopify or WooCommerce. Craft relies on third-party plugins or custom code, so check the plugin store for a connector that supports your versions.

Free · 30 min

Get Craft and Klaviyo joined properly

Free30 minutesNo obligation