Integrations

Matomo in Shopify: tracking via a custom pixel, with e-commerce and consent

Shopify has rebuilt the way third-party code gets in: inserted scripts no longer run in the checkout and on the thank-you page; instead, pixels receive the shop's events. Here is how Matomo gets product views, cart and orders that way, how consent is connected and what to check before you trust the numbers.

For a long time, Matomo got into a Shopify store like into any website: code in the theme, a snippet for the thank-you page in the additional scripts. That way is closed. Shopify no longer allows your own code in the checkout and instead delivers events to pixels that run isolated from the shop. Matomo calls such a custom pixel the supported way for tracking and e-commerce in Shopify.

Why theme code is no longer enough

  • Checkout: checkout.liquid is no longer supported for the Information, Shipping and Payment steps.
  • Thank-you and order status pages: checkout.liquid and the additional scripts were switched off there on 28 August 2025. App script tags stopped running there for Plus stores on that day, for all others on 26 August 2026.
  • Storefront pages: script tags can no longer be created or updated since 1 October 2026 and stop running on 1 March 2027.

Matomo therefore advises removing old code from the theme, checkout.liquid and the additional scripts so nothing is counted twice, and rebuilding the tracking as a pixel.

The custom pixel

You create the custom pixel in Shopify under Settings > Customer events. It runs in a sandbox, an isolated frame without access to the page, and receives Shopify’s standard events. Matomo’s guide maps them to Matomo’s e-commerce functions:

Event in Shopify In Matomo
page_viewed page view
collection_viewed, product_viewed view of a category or product
product_added_to_cart, cart_viewed cart with items and value
checkout_completed order with items, revenue, tax and shipping
How shop data reaches Matomo: Shopify reports events such as product view, cart and purchase to the custom pixel running in a sandbox, and the pixel translates them into Matomo's e-commerce calls.

Because the pixel does not see the page, Matomo’s sample passes the page address explicitly. For the same reason, the pixel does not detect clicks on outbound links, scrolling or form input by itself; the theme has to report such interactions to Shopify as custom events.

With the Tag Manager: for Matomo Tag Manager, the pixel pushes Shopify’s events into the container’s data layer. You then maintain triggers and tags in Matomo. Matomo advises triggers on data layer events, not on clicks.

  • Shopify decides when the pixel runs. In markets that require consent, such as the EEA and the UK, a pixel only runs once visitors have allowed the configured purposes. A new custom pixel requires both marketing and analytics by default; check whether that fits your Matomo setup.
  • The consent tool has to work with the Customer Privacy API. According to Matomo, Shopify’s banner does not control Matomo by itself. You need a consent tool connected to Shopify’s Customer Privacy API, and never Shopify’s banner and a third-party tool at the same time.
  • Matomo listens to the decision. The pixel starts with requireConsent, reads the consent for analytics and reacts when it is granted or withdrawn. Counting starts with the next event after consent.

How Matomo measures with and without consent is covered in Matomo and privacy and Matomo without cookies.

What to test in your shop

The pixel is quick to set up. Whether the numbers are right only shows in a test in the real shop:

  • Recognition: does a visitor stay one visit across several pages, or fall apart into many?
  • Source: do channel and campaign arrive, or does everything end up as direct traffic?
  • Product views: do products and categories appear in the e-commerce reports?
  • Orders: Shopify reports a purchase exactly once. If the thank-you page does not load, the order is missing, with no second attempt. Regularly comparing with the orders in Shopify shows the gap.
  • Details in the sample code: Matomo’s sample sets the discount to 0 and uses the product ID in the cart but the variant ID for product views and orders. Both are worth adjusting.

What makes Shopify tracking reliable

  • One wayThe pixel, with old code removed from theme and checkout.
  • Consent through ShopifyA consent tool on the Customer Privacy API.
  • Tested in the real shopVisits, source, products and orders checked.
  • Reconciled with ShopifyOrders in Matomo and Shopify compared regularly.

Typical pitfalls

  • Old code staysEvents arrive twice.
  • Two bannersShopify banner and consent tool contradict each other.
  • Click triggers in the Tag ManagerThe pixel does not see the page.
  • Blind trustMissing orders only show up at month-end.

Apps and orders from the server

Matomo itself offers no Shopify app. In the App Store there is Matomo Connect, a small third-party app whose scope is hardly documented.

The commercial app Matomo for Shopify by the French Matomo agency Openmost goes further. According to Openmost, it connects the shop through a theme extension without your own code, follows every checkout step through a web pixel, carries the visitor ID from the first view to the order and, if you want, also reports orders and refunds from the server via Shopify’s webhooks. Consent runs through the Customer Privacy API. As of November 2026 the app is not yet available, but Openmost’s product page already shows many telling screenshots.

If you want to report orders from the server yourself, Shopify offers webhooks for new, paid and cancelled orders and Matomo the Tracking API; there is no official guide for Shopify. How orders go from Matomo on to ad platforms is covered in Conversions API.

Sources

As of 12 November 2026

FAQ

Frequently asked questions

Do I need an app to use Matomo in Shopify?

No. Matomo describes a custom pixel as the supported way, with the tracking code or with Matomo Tag Manager. An app is worth it if it does more than the pixel, such as also reporting orders from the server.

Why are orders missing in Matomo?

Shopify reports a purchase exactly once, usually on the thank-you page, with upsell offers already on the first upsell page. If that page does not load, the order never arrives. Add visitors without consent and ad blockers. Regularly comparing with the orders in Shopify shows how big the gap is.

Does Matomo Tag Manager work in Shopify?

Yes. The pixel pushes Shopify's events into the Tag Manager's data layer, and triggers and tags run in Matomo. Matomo advises triggers on data layer events rather than clicks, because the pixel does not see the page directly.

What should I do with old tracking code?

Remove it. Code in theme.liquid, checkout.liquid or the additional scripts would report events a second time alongside the pixel.

Questions about your setup?

In an intro call we'll look at your situation together.

Book an intro call

Newsletter

Matomo know-how, once a month.

Practical tips on tracking, privacy settings and performance, plus notes on important Matomo updates. No spam, unsubscribe any time.