Skip to main content
Craft → CriteoIntegration guide

Connecting Craft CMS to Criteo

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. Criteo is a retargeting and commerce media network built on product-level data, which means its feed matters as much as its conversion events. The join between them succeeds or fails on one thing: whether the Criteo user identifier and product IDs reaches the Craft Commerce order before the conversion happens, because Criteo can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Craft Commerce and Criteo: make the feed and the order agree on IDs

Make Craft Commerce's order event emit the same product ID as the Criteo feed, usually the variant SKU, changing the event to match the feed. Send each line item's ID, quantity and unit price with the order reference as transaction ID, confirm the price currency, and rerun the feed-versus-order comparison after catalogue changes.

Criteo resolves each sale against your catalogue, and on a Craft store the catalogue feed and the order event are often written by different code at different times. A Commerce product can carry several variants, each with its own SKU and its own element ID; whatever feed template or plugin your agency set up decides which becomes the Criteo product ID, and the order-complete listener has to emit the same one from every line item. The variant SKU is the usual choice. If the feed already uses something else, change the event to match the feed, not the other way round.

Send the transaction with each line item's ID, quantity and unit price, and the order reference as the transaction ID, so a OneTag sale on the confirmation page and a server event dedupe. If the store sells in more than one currency, confirm which currency the line item prices are expressed in before sending, since Commerce can record a base currency and a separate payment currency on the same order.

The common break is a feed regenerated nightly or from a cached template while products are re-SKU'd in the control panel, so recent orders reference IDs Criteo hasn't seen yet. Rerun the feed-versus-order comparison after any catalogue change, not only at launch.

Craft → Criteo · what breaks

Why this join usually fails — Craft → Criteo

  1. 01

    The Criteo user identifier and product IDs 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

    Product IDs that do not match the feed

    Criteo resolves conversions against your catalogue. If the IDs in your purchase events differ from the IDs in your feed — a common outcome when the feed is generated by a different system — the conversion resolves poorly and the reported value is wrong.

  4. 04

    Nothing reconciles afterwards

    Criteo reports conversions on its own attribution windows, which include view-through. Reconcile against your own order records and be explicit that view-through credit is included — otherwise the comparison will never balance.

Craft → Criteo · the fix

What working looks like — Craft → Criteo

  • The Criteo user identifier and product IDs on every order

  • Conversions arriving in Criteo

    Conversions appear in Criteo's reporting attributed to its own view- and click-through windows, which are worth understanding before comparing anything.

  • Reconciled against the source

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

Craft → Criteo · architecture

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

    Criteo needs a click to match

    Criteo needs the transaction with its product IDs, quantities and values, matched to your catalogue feed. Identity resolution is Criteo's side of the problem; feed consistency is yours.

  3. 3

    The identifier is the bridge

    The Criteo user identifier and product IDs, 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

    Criteo deduplicates on the transaction identifier. Sending the same order from both a tag and a server integration without a shared ID counts it twice, and on a retargeting network that inflates the metric the whole channel is judged on.

Craft → Criteo · normal or broken

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

Normal, not a fault

  • The Criteo user identifier and product IDs 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

    Criteo deduplicates on the transaction identifier. Sending the same order from both a tag and a server integration without a shared ID counts it twice, and on a retargeting network that inflates the metric the whole channel is judged on.

  • Reconciles with the source

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

Actually broken

  • The Criteo user identifier and product IDs 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

    Criteo resolves conversions against your catalogue. If the IDs in your purchase events differ from the IDs in your feed — a common outcome when the feed is generated by a different system — the conversion resolves poorly and the reported value is wrong.

  • Nobody has reconciled it

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

Craft → Criteo · diagnose

Diagnostic order — Craft → Criteo

  1. 01

    Count orders carrying the Criteo user identifier and product IDs

  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

    Compare product IDs in a real conversion against the catalogue feed

    They must match exactly. This single check explains most Criteo value discrepancies.

  5. 05

    Read the match rate, not the success message

    Criteo reports conversions on its own attribution windows, which include view-through. Reconcile against your own order records and be explicit that view-through credit is included — otherwise the comparison will never balance.

Craft → Criteo · prove

How it gets proven — Craft → Criteo

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 Criteo user identifier and product IDs confirmed present on a live order.
  • Product IDs in a live conversion confirmed to match the catalogue feed exactly.
  • Order custom field confirmed populated on an order placed as an anonymous visitor through cache.

Craft → Criteo · free audit

What we check in the free audit

  • Count orders carrying the Criteo user identifier and product IDs
  • Follow one real conversion end to end
  • Read how this specific build handles order completion
  • Compare product IDs in a real conversion against the catalogue feed
  • 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 → Criteo · when not to buy

When you don't need this — Craft → Criteo

  • If Criteo 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 Criteo user identifier and product IDs.
  • If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
  • If you do not sell products with a catalogue, Criteo's model does not fit and the effort is misdirected.

Craft → Criteo · what we deliver

What gets built — Craft → Criteo

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

    Server-side transaction events with product IDs matching the catalogue feed, plus the feed itself kept in sync.

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

Whatever your Criteo feed uses, applied identically in the transaction event. The variant SKU is the usual choice because element IDs can differ between environments after a migration.

Free · 30 min

Get Craft and Criteo joined properly

Free30 minutesNo obligation