Connecting Drupal Commerce to Pinterest
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. Pinterest is a save-now-buy-later platform, which makes its attribution window the loosest of any network here and its conversion data the most delayed. The join between them succeeds or fails on one thing: whether the epik click identifier reaches the Drupal Commerce order before the conversion happens, because Pinterest can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Drupal Commerce to Pinterest CAPI: checkout events with order-ID dedup
Send a Pinterest checkout event from the Drupal Commerce order's place transition with order total, currency and line items, using the Commerce order ID as event_id on both the server event and the Pinterest tag. Copy _epik onto the draft order at cart creation, reread it at placement, and always include hashed email from the order.
Pinterest suits the consumer side of Drupal Commerce: home goods, pattern and craft shops, museum and gift stores. Send checkout from the order's place transition with the order total, its currency and the line items as contents, and use the Commerce order ID as the event_id on both the server event and the Pinterest tag so Pinterest can deduplicate them.
Getting that ID to the tag is the Drupal-specific part. The checkout completion step is rendered for the order's own session, so a tag there can print the order ID, but only if your theme or checkout pane overrides actually output the snippet; custom completion templates sometimes drop it. Check that the tag fires exactly once per order before trusting deduplication, because at Pinterest's volumes a doubling looks like a good week.
The epik arrives on the landing URL and the tag stores it in _epik, and save-now-buy-later means that cookie and the purchase can be weeks apart. Copy it onto the draft order when the cart is created, read it again at placement, and send hashed email from the order regardless. Museum and nonprofit shops that sell memberships or donations alongside goods should leave those lines out of the Pinterest value unless that is what you are buying ads for.
Drupal Commerce → Pinterest · what breaks
Why this join usually fails — Drupal Commerce → Pinterest
- 01
The epik click identifier 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
The save-now-buy-later gap
Pinterest's whole behaviour model is saving something for later. A share of the revenue it genuinely drives arrives months after the click and outside any attribution window, and no build changes that. Say it before anyone sets a target.
- 04
Nothing reconciles afterwards
Pinterest Ads Manager reports events received and their match status. A successful API call is not a matched conversion — reconcile Pinterest's reported conversions against your own records for the same window and expect a structural gap from the save-then-buy delay.
Drupal Commerce → Pinterest · the fix
What working looks like — Drupal Commerce → Pinterest
The epik click identifier on every order
Conversions arriving in Pinterest
Conversions appear in Pinterest Ads Manager against the campaign, with the value you sent, and become usable for optimization.
Reconciled against the source
Drupal Commerce → Pinterest · architecture
How Drupal Commerce and Pinterest 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
Pinterest needs a click to match
Pinterest matches server events using the click identifier where present and hashed customer information otherwise. Confirm current endpoint and field names against Pinterest's own documentation — its Conversions API has been through more than one revision.
- 3
The identifier is the bridge
The epik click identifier, 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
Pinterest deduplicates on event_id, so the tag and the server event must carry the same value for the same conversion. Pinterest volumes are often low enough that a doubling reads as a good week rather than a bug, which is why this needs testing deliberately rather than assuming.
Drupal Commerce → Pinterest · normal or broken
Working vs. broken, side by side — Drupal Commerce → Pinterest
Normal, not a fault
The epik click identifier present on the order
Sent from the Drupal Commerce order placement hook
Deduplicated correctly
Pinterest deduplicates on event_id, so the tag and the server event must carry the same value for the same conversion. Pinterest volumes are often low enough that a doubling reads as a good week rather than a bug, which is why this needs testing deliberately rather than assuming.
Reconciles with the source
Actually broken
The epik click identifier 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
Pinterest's whole behaviour model is saving something for later. A share of the revenue it genuinely drives arrives months after the click and outside any attribution window, and no build changes that. Say it before anyone sets a target.
Nobody has reconciled it
Drupal Commerce → Pinterest · diagnose
Diagnostic order — Drupal Commerce → Pinterest
- 01
Count orders carrying the epik click identifier
- 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 event delivery and match reporting in Pinterest Ads Manager
Not the API response code. A 200 means Pinterest accepted the payload, not that it matched it to a click.
- 05
Read the match rate, not the success message
Pinterest Ads Manager reports events received and their match status. A successful API call is not a matched conversion — reconcile Pinterest's reported conversions against your own records for the same window and expect a structural gap from the save-then-buy delay.
Drupal Commerce → Pinterest · prove
How it gets proven — Drupal Commerce → Pinterest
Source of truth
Drupal's commerce_order records in your own database, filtered to completed states.
- The epik click identifier confirmed present on a live order.
- Deduplication confirmed on a real conversion, and the attribution window your reporting uses stated explicitly.
- Order field data confirmed populated on an order placed through a fully warmed cache as an anonymous visitor.
Drupal Commerce → Pinterest · free audit
What we check in the free audit
- Count orders carrying the epik click identifier
- Follow one real conversion end to end
- List the order states in use and agree which count as revenue
- Check the event delivery and match reporting in Pinterest Ads Manager
- 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 → Pinterest · when not to buy
When you don't need this — Drupal Commerce → Pinterest
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the epik click identifier.
- If your Drupal site is content-only with commerce elsewhere, work at the commerce system instead — this is the wrong layer.
- If Pinterest is a small test line on your media plan, the Conversions API is more work than the signal is worth this quarter.
Drupal Commerce → Pinterest · what we deliver
What gets built — Drupal Commerce → Pinterest
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 Pinterest
Server events to the Pinterest Conversions API with the click identifier, hashed customer data and a matched event_id.
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 → Pinterest questions, answered
The order's place transition, fired server-side from an event subscriber, with the order ID as event_id. The completion page template is not a reliable trigger on its own.
Print the Commerce order ID into the tag on the completion step and send the same ID as event_id from the server. Test one order and confirm Pinterest shows one event.
Almost always because the epik click identifier 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.
The epik parameter, appended to your landing page URL and stored by the tag in the _epik cookie. Pinterest also matches on hashed email and phone. The complication is behavioural rather than technical: a Pin saved in October and acted on in December is completely normal, so a meaningful share of genuine Pinterest-driven revenue falls outside any click window and is structurally unattributable.
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.
Pinterest Ads Manager reports events received and their match status. A successful API call is not a matched conversion — reconcile Pinterest's reported conversions against your own records for the same window and expect a structural gap from the save-then-buy delay.
More on Drupal Commerce → Pinterest
- Squarespace → PinterestConnecting Squarespace Commerce to Pinterest
- Drupal Commerce → Google AdsConnecting Drupal Commerce to Google Ads
- Drupal Commerce → MetaConnecting Drupal Commerce to Meta Conversions API
RELATED GUIDES
Where Drupal Commerce → Pinterest fits in the rest of your tracking
- Pinterest · Local servicesPinterest Ads conversion tracking for local service businesses
- Pinterest · B2BPinterest Ads conversion tracking for B2B companies
- Pinterest × Ecommerce OrdersHow to reconcile Pinterest Ads against your store's order table
- Pinterest · Comparison page → demoHow to track comparison page visit to demo request for Pinterest Ads
- Webflow → PinterestConnecting Webflow to Pinterest
- Drupal Commerce → MetaConnecting Drupal Commerce to Meta Conversions API
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Statamic → PinterestConnecting Statamic to Pinterest
Free · 30 min
Get Drupal Commerce and Pinterest joined properly
Free30 minutesNo obligation
