Connecting Drupal Commerce to Klaviyo
Drupal Commerce is self-hosted commerce inside a CMS built for complex content, which means the store is one part of a much larger site you fully control. 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 Drupal 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
Drupal Commerce to Klaviyo: Placed Order from the place transition
Check drupal.org for a maintained Klaviyo module, or write an event subscriber. Fire Placed Order and Ordered Product on the place transition with the order's currency and order ID as unique_id, never an entity save hook. Send Started Checkout server-side when the email is saved on the draft order, and refunds as their own metric.
As far as we know, Klaviyo does not list Drupal Commerce among its built-in integrations, so check drupal.org for a maintained contributed module that matches your Drupal and Commerce major versions; many sites end up writing a small event subscriber instead. Fire Placed Order on the order's place transition and Ordered Product per line item, using the order's own currency code, since a Commerce store can sell in more than one currency.
Started Checkout is where Drupal makes Klaviyo easier than most platforms. A Commerce cart is already a draft order entity, and the checkout flow captures the email early in the contact information step. Send Started Checkout server-side when that email is saved on the draft order, and abandoned-checkout flows work even for anonymous visitors whose pages came from the cache. Browse tracking through klaviyo.js runs in the browser and is unaffected by the page cache, but it only identifies visitors after they give an email or click a Klaviyo message.
The break to test for: an order edited after placement, such as an admin changing a line or a promotion being reapplied, triggering a second Placed Order because the send was wired to an entity save hook rather than the transition. Fire on the transition only, pass the order ID as the event's unique_id, and send refunds as their own metric from the refund or cancel transition so flows stop pitching to a customer who returned everything.
Drupal Commerce → Klaviyo · what breaks
Why this join usually fails — Drupal Commerce → Klaviyo
- 01
The profile identity — email or phone never reaches Drupal Commerce
Drupal's internal page cache and any reverse proxy in front of it serve stored renders, so anything relying on dynamically rendered values fails intermittently. Multilingual and multi-site installs add further paths where the capture code may simply not run.
- 02
Configurable workflow states nobody agreed on
Drupal Commerce lets each install define its own order states. Two people reporting on the same store routinely count different states and never reconcile.
- 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.
- 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.
Drupal Commerce → Klaviyo · the fix
What working looks like — Drupal Commerce → 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
Drupal Commerce → Klaviyo · architecture
How Drupal Commerce and Klaviyo actually connect
- 1
Drupal Commerce holds the truth
You own the database, so the truth is exactly as good as the query. Pin down which order states count as revenue before comparing anything — Drupal's workflow states are configurable per install, so no two sites agree by default.
- 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
The identifier is the bridge
The profile identity — email or phone, captured at the visit and carried into the Drupal Commerce order.
- 4
The event source decides reliability
Fire server-side from the hook rather than the checkout completion template, which is cacheable and may not execute anything.
- 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.
Drupal Commerce → Klaviyo · normal or broken
Working vs. broken, side by side — Drupal Commerce → Klaviyo
Normal, not a fault
The profile identity — email or phone present on the order
Sent from the Drupal Commerce order placement hook
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
Actually broken
The profile identity — email or phone missing on most records
Drupal's internal page cache and any reverse proxy in front of it serve stored renders, so anything relying on dynamically rendered values fails intermittently. Multilingual and multi-site installs add further paths where the capture code may simply not run.
Sent from the browser
Drupal Commerce lets each install define its own order states. Two people reporting on the same store routinely count different states and never reconcile.
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
Drupal Commerce → Klaviyo · diagnose
Diagnostic order — Drupal Commerce → Klaviyo
- 01
Count orders carrying the profile identity — email or phone
- 02
Follow one real conversion end to end
- 03
List the order states in use and agree which count as revenue
Do this before any technical work — it resolves more Drupal Commerce disputes than any code change.
- 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.
- 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.
Drupal Commerce → Klaviyo · prove
How it gets proven — Drupal Commerce → Klaviyo
Source of truth
Drupal's commerce_order records in your own database, filtered to completed states.
- 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 field data confirmed populated on an order placed through a fully warmed cache as an anonymous visitor.
Drupal Commerce → 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
- List the order states in use and agree which count as revenue
- Open the profile's activity feed after a test event
- Read the match rate, not the success message
Checked against
Drupal's commerce_order records in your own database, filtered to completed states.
Free30 minutesNo obligation
Drupal Commerce → Klaviyo · when not to buy
When you don't need this — Drupal Commerce → Klaviyo
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the profile identity — email or phone.
- If your Drupal site is content-only with commerce elsewhere, work at the commerce system instead — this is the wrong layer.
- If Klaviyo's native store integration already sends the events your flows need, adding a second source creates duplicates rather than value.
Drupal Commerce → Klaviyo · what we deliver
What gets built — Drupal Commerce → Klaviyo
Identifier capture into Drupal Commerce
Capture the identifier and persist it as order field data through a hook on order placement, server-side, so it never depends on what the cache served.
Event source: the Drupal Commerce order placement hook
Fire server-side from the hook rather than the checkout completion template, which is cacheable and may not execute anything.
Dispatch to Klaviyo
The Klaviyo Events API with the profile identifiers and the event properties, sent server-side.
Reversals where they exist
Order state transitions to refunded or cancelled are recorded and can drive reversals.
Written guarantee
95%+ tracking accuracy
Measured against Drupal's commerce_order records in your own database, filtered to completed states.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Drupal Commerce → Klaviyo questions, answered
Check drupal.org for a contributed module that supports your Drupal and Commerce versions and is actively maintained. If none fits, a server-side event subscriber calling Klaviyo's Events API is a small build.
Send Started Checkout server-side once the email is saved on the draft order during checkout, with the cart lines and value. That avoids depending on cached pages running JavaScript.
Almost always because the profile identity — email or phone never reached the Drupal Commerce order. Drupal's internal page cache and any reverse proxy in front of it serve stored renders, so anything relying on dynamically rendered values fails intermittently. Multilingual and multi-site installs add further paths where the capture code may simply not run. Measure coverage before debugging the dispatch.
Klaviyo is identity-first: it resolves to a profile by email address or phone number. The __kla_id cookie ties an anonymous browser to a profile once identified. Events without any identifier are dropped, and events with a new email create a new profile rather than updating an existing one — which quietly fragments your list.
The Drupal Commerce order placement hook. Fire server-side from the hook rather than the checkout completion template, which is cacheable and may not execute anything.
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.
More on Drupal Commerce → Klaviyo
- Squarespace → KlaviyoConnecting Squarespace Commerce to Klaviyo
- Drupal Commerce → Google AdsConnecting Drupal Commerce to Google Ads
- Drupal Commerce → MetaConnecting Drupal Commerce to Meta Conversions API
RELATED GUIDES
Where Drupal Commerce → Klaviyo fits in the rest of your tracking
- Webflow → KlaviyoConnecting Webflow to Klaviyo
- Umbraco → KlaviyoConnecting Umbraco to Klaviyo
- Statamic → KlaviyoConnecting Statamic to Klaviyo
- Drupal Commerce → Customer.ioConnecting Drupal Commerce to Customer.io
- Drupal Commerce → BrazeConnecting Drupal Commerce to Braze
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Contentful → KlaviyoConnecting Contentful to Klaviyo
- Sitecore → KlaviyoConnecting Sitecore to Klaviyo
Free · 30 min
Get Drupal Commerce and Klaviyo joined properly
Free30 minutesNo obligation
