Connecting Drupal Commerce to Marketo
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. Marketo scores leads rather than counting conversions, which means what you send it does not report a number — it changes who your sales team calls tomorrow. The join between them succeeds or fails on one thing: whether the lead record, keyed on email reaches the Drupal Commerce order before the conversion happens, because Marketo can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Drupal Commerce to Marketo: orders as a custom object on the lead
Marketo fits Drupal Commerce stores selling to businesses. Post orders from the order placement hook through the REST API as a custom object linked to the lead by email, with order number, date, total and product types, updating the same record on cancellation. Merge personal and work-email leads on the company before scoring.
Marketo is built for B2B lead scoring, so this pair fits a Drupal Commerce store that sells to businesses: trade accounts, distributors, institutions ordering online. For a consumer store, pushing orders into Marketo creates a database of shoppers that no sales team will call, and an email platform built for ecommerce is a better home.
Where it fits, send orders to Marketo as a custom object linked to the lead by email, not as a stream of activities. An orders object with order number, date, total and product types lets Smart Lists and scoring ask useful questions: first order from a new account, reorder after a long gap, order above a threshold that sales should follow up. Post it from the Drupal order placement hook through the REST API, and update the same record by order number when the order is canceled rather than inserting another.
Check whether the contributed Marketo module works on your Drupal version for the Munchkin tag and forms; it will not send orders for you. The common failure is lead duplication: a buyer who registered on the Drupal site with a personal email and orders with a work email becomes two leads, with web history on one and the order on the other. Merge on the company record before scoring anything.
Drupal Commerce → Marketo · what breaks
Why this join usually fails — Drupal Commerce → Marketo
- 01
The lead record, keyed on email 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
A scoring threshold crossed by a duplicate
Unlike an ad platform, a duplicate here has an operational consequence: a lead is marked sales-ready, routed, and called by a person. Doing that on the strength of an event counted twice wastes the most expensive resource in the funnel.
- 04
Nothing reconciles afterwards
Marketo shows the activity log on the lead record with the resulting score change. Read the lead, not the API response, and verify no duplicate lead was created.
Drupal Commerce → Marketo · the fix
What working looks like — Drupal Commerce → Marketo
The lead record, keyed on email on every order
Conversions arriving in Marketo
The activity lands on the lead, scoring rules evaluate, and the lead may move into a nurture programme or into the sales queue.
Reconciled against the source
Drupal Commerce → Marketo · architecture
How Drupal Commerce and Marketo 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
Marketo needs a click to match
Marketo needs the lead's email and the activity or custom object you are recording, with the fields the scoring rules actually reference. An activity that no scoring rule looks at changes nothing.
- 3
The identifier is the bridge
The lead record, keyed on email, 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
Marketo deduplicates leads on email by default, but activities are not deduplicated. A purchase pushed twice can trigger a scoring rule twice and push a lead over a threshold it should not have crossed.
Drupal Commerce → Marketo · normal or broken
Working vs. broken, side by side — Drupal Commerce → Marketo
Normal, not a fault
The lead record, keyed on email present on the order
Sent from the Drupal Commerce order placement hook
Deduplicated correctly
Marketo deduplicates leads on email by default, but activities are not deduplicated. A purchase pushed twice can trigger a scoring rule twice and push a lead over a threshold it should not have crossed.
Reconciles with the source
Actually broken
The lead record, keyed on email 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 has an operational consequence: a lead is marked sales-ready, routed, and called by a person. Doing that on the strength of an event counted twice wastes the most expensive resource in the funnel.
Nobody has reconciled it
Drupal Commerce → Marketo · diagnose
Diagnostic order — Drupal Commerce → Marketo
- 01
Count orders carrying the lead record, keyed on email
- 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
Check the lead's activity log after a test conversion
One activity or two, and did the score move by the amount the rule specifies? That is the whole test.
- 05
Read the match rate, not the success message
Marketo shows the activity log on the lead record with the resulting score change. Read the lead, not the API response, and verify no duplicate lead was created.
Drupal Commerce → Marketo · prove
How it gets proven — Drupal Commerce → Marketo
Source of truth
Drupal's commerce_order records in your own database, filtered to completed states.
- The lead record, keyed on email confirmed present on a live order.
- Activities confirmed on single lead records with score changes matching the configured rules, and no duplicate leads created.
- Order field data confirmed populated on an order placed through a fully warmed cache as an anonymous visitor.
Drupal Commerce → Marketo · free audit
What we check in the free audit
- Count orders carrying the lead record, keyed on email
- Follow one real conversion end to end
- List the order states in use and agree which count as revenue
- Check the lead's activity log after a test conversion
- 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 → Marketo · when not to buy
When you don't need this — Drupal Commerce → Marketo
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the lead record, keyed on email.
- If your Drupal site is content-only with commerce elsewhere, work at the commerce system instead — this is the wrong layer.
- If your sales team does not act on lead scores, pushing conversions into Marketo produces a tidier database and changes nothing about revenue.
Drupal Commerce → Marketo · what we deliver
What gets built — Drupal Commerce → Marketo
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 Marketo
The Marketo REST API, posted server-side to create or update the lead and record the activity.
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 → Marketo questions, answered
If it sells to businesses and a sales team acts on Marketo scores, yes. For consumer orders, an ecommerce email platform is a better fit.
As a custom object linked to the lead by email, keyed on the Drupal order number, so cancellations update the same record instead of creating a new one.
Almost always because the lead record, keyed on email 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.
Marketo resolves to a lead by email address, with a Munchkin cookie tying anonymous web activity to that lead once known. Send an activity with a new email and you create a duplicate lead rather than updating one — and duplicate leads in a scoring system produce two half-scored people instead of one qualified one.
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.
Marketo shows the activity log on the lead record with the resulting score change. Read the lead, not the API response, and verify no duplicate lead was created.
More on Drupal Commerce → Marketo
- Drupal Commerce → Google AdsConnecting Drupal Commerce to Google Ads
- Drupal Commerce → MetaConnecting Drupal Commerce to Meta Conversions API
- Drupal Commerce → GA4Connecting Drupal Commerce to GA4
RELATED GUIDES
Where Drupal Commerce → Marketo fits in the rest of your tracking
- Umbraco → MarketoConnecting Umbraco to Marketo
- Sitecore → MarketoConnecting Sitecore to Marketo
- Concrete CMS → MarketoConnecting Concrete CMS to Marketo
- Drupal Commerce → SalesforceConnecting Drupal Commerce to Salesforce
- Drupal Commerce → 6senseConnecting Drupal Commerce to 6sense
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Contentful → MarketoConnecting Contentful to Marketo
- Statamic → MarketoConnecting Statamic to Marketo
Free · 30 min
Get Drupal Commerce and Marketo joined properly
Free30 minutesNo obligation
