Connecting Drupal Commerce to PartnerStack
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. PartnerStack commissions partners on recurring subscription revenue rather than on a single order, which makes it the one destination here where a conversion you send creates a payment obligation that repeats every month. The join between them succeeds or fails on one thing: whether the PartnerStack referral key reaches the Drupal Commerce order before the conversion happens, because PartnerStack can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Drupal Commerce to PartnerStack: report each recurring order
PartnerStack only fits a Drupal Commerce store that sells subscriptions through Commerce Recurring. Store the PartnerStack referral key from the partner link in a first-party cookie, copy it onto the first order and persist it on the customer or subscription, then report every paid recurring order server-side with the same customer identifier and the amount collected, plus cancellations and refunds.
PartnerStack commissions recurring revenue, so the first question for a Drupal Commerce store is whether it sells subscriptions at all. If it sells one-off products, an affiliate network built around single orders is a better fit and this pair adds complexity for nothing. If it does sell subscriptions through the contributed Commerce Recurring module, each billing period generates its own recurring order in Drupal, and that is the record PartnerStack needs to hear about every time it is paid.
The join is the PartnerStack referral key from the partner's link. Store it in a first-party cookie, copy it onto the initial order, and persist it on the customer or the subscription entity, because the recurring orders that follow are created by cron with no browser and no cookie present. Each paid recurring order is then reported with the same customer identifier and the amount actually collected.
The usual failure is only reporting the first order. The partner gets one commission instead of a share of every renewal, notices months later, and you cannot reconstruct which renewals were theirs. The opposite failure is reporting a recurring order whose payment then failed; send on the payment completing, not the order being generated, and report cancellations and refunds so commissions stop.
Drupal Commerce → PartnerStack · what breaks
Why this join usually fails — Drupal Commerce → PartnerStack
- 01
The PartnerStack referral key 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 commission that recurs on revenue that stopped
The mirror of the usual problem. If cancellations are not reported back, partners keep earning on subscriptions that churned months ago. Every conversion pipeline needs reversals; this one needs them because real money leaves the building otherwise.
- 04
Nothing reconciles afterwards
PartnerStack shows attributed customers and accruing commission per partner. Reconcile the commissionable revenue against your billing system's active subscriptions, not against its historical sales.
Drupal Commerce → PartnerStack · the fix
What working looks like — Drupal Commerce → PartnerStack
The PartnerStack referral key on every order
Conversions arriving in PartnerStack
The customer is attributed to a partner, and commission accrues against the recognized revenue on the schedule you configured.
Reconciled against the source
Drupal Commerce → PartnerStack · architecture
How Drupal Commerce and PartnerStack 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
PartnerStack needs a click to match
PartnerStack needs the referral key, the customer identifier and the subscription value. Recurring commission also needs the ongoing revenue reported, not just the first payment.
- 3
The identifier is the bridge
The PartnerStack referral key, 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
Deduplication is on your customer identifier. Reporting the same subscription twice creates two commissionable relationships against one paying customer, and the error compounds monthly rather than once.
Drupal Commerce → PartnerStack · normal or broken
Working vs. broken, side by side — Drupal Commerce → PartnerStack
Normal, not a fault
The PartnerStack referral key present on the order
Sent from the Drupal Commerce order placement hook
Deduplicated correctly
Deduplication is on your customer identifier. Reporting the same subscription twice creates two commissionable relationships against one paying customer, and the error compounds monthly rather than once.
Reconciles with the source
Actually broken
The PartnerStack referral key 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
The mirror of the usual problem. If cancellations are not reported back, partners keep earning on subscriptions that churned months ago. Every conversion pipeline needs reversals; this one needs them because real money leaves the building otherwise.
Nobody has reconciled it
Drupal Commerce → PartnerStack · diagnose
Diagnostic order — Drupal Commerce → PartnerStack
- 01
Count orders carrying the PartnerStack referral key
- 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 whether churn events reach PartnerStack at all
In most implementations the new-subscription path was built and the cancellation path was not, because only one of them is exciting.
- 05
Read the match rate, not the success message
PartnerStack shows attributed customers and accruing commission per partner. Reconcile the commissionable revenue against your billing system's active subscriptions, not against its historical sales.
Drupal Commerce → PartnerStack · prove
How it gets proven — Drupal Commerce → PartnerStack
Source of truth
Drupal's commerce_order records in your own database, filtered to completed states.
- The PartnerStack referral key confirmed present on a live order.
- Commissionable recurring revenue reconciled against active subscriptions in billing, with cancellations proven to reverse.
- Order field data confirmed populated on an order placed through a fully warmed cache as an anonymous visitor.
Drupal Commerce → PartnerStack · free audit
What we check in the free audit
- Count orders carrying the PartnerStack referral key
- Follow one real conversion end to end
- List the order states in use and agree which count as revenue
- Check whether churn events reach PartnerStack at all
- 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 → PartnerStack · when not to buy
When you don't need this — Drupal Commerce → PartnerStack
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the PartnerStack referral key.
- If your Drupal site is content-only with commerce elsewhere, work at the commerce system instead — this is the wrong layer.
- If you run no partner or affiliate programme, there is nothing to send here. If you run one on one-off sales rather than subscriptions, the recurring-commission complexity does not apply to you.
Drupal Commerce → PartnerStack · what we deliver
What gets built — Drupal Commerce → PartnerStack
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 PartnerStack
Server-side reporting from your billing system, with the referral key, customer identifier and the recurring revenue as it is recognized.
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 → PartnerStack questions, answered
It can if subscriptions run through Commerce Recurring. Store the referral key on the subscription and report every paid recurring order, not just the first.
Usually only the first order was reported, because recurring orders are created by cron with no cookie. Persist the key on the subscription and report each paid renewal.
Almost always because the PartnerStack referral key 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.
PartnerStack attributes through a referral key carried on the link and stored against the customer. Because commissions are frequently paid on recurring revenue for the life of the subscription, losing the key does not cost a partner one commission — it costs them the whole relationship's worth, and produces a dispute you cannot resolve after the fact.
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.
PartnerStack shows attributed customers and accruing commission per partner. Reconcile the commissionable revenue against your billing system's active subscriptions, not against its historical sales.
More on Drupal Commerce → PartnerStack
- 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 → PartnerStack fits in the rest of your tracking
- Statamic → PartnerStackConnecting Statamic to PartnerStack
- Sanity → PartnerStackConnecting Sanity to PartnerStack
- Umbraco → PartnerStackConnecting Umbraco to PartnerStack
- Drupal Commerce → ImpactConnecting Drupal Commerce to Impact.com
- Drupal Commerce → AwinConnecting Drupal Commerce to Awin
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Sitecore → PartnerStackConnecting Sitecore to PartnerStack
- Contentful → PartnerStackConnecting Contentful to PartnerStack
Free · 30 min
Get Drupal Commerce and PartnerStack joined properly
Free30 minutesNo obligation
