Why does the cart show as abandoned when the purchase was completed?
Cart abandonment occurs when a visitor adds items to their cart but does not complete the checkout within the same session. Matomo records both abandoned carts and completed orders to measure potential revenue lost and actual revenue gained.
A cart may appear as abandoned if the visitor has not finished checkout yet. As soon as the purchase is completed within the same session, Matomo links the order to the cart, and it no longer counts as abandoned. However, there may be cases when a cart appears as abandoned even though the purchase went through. The abandoned cart is recorded but the matching purchase is not, which can happen for several reasons.
This guide explains possible causes to help you troubleshoot why a cart shows as abandoned after a completed purchase.
Session timeouts
If a visitor adds items to the cart and then remains inactive for more than 30 minutes, Matomo ends the visit. If they return later and complete the order, the abandoned cart is still recorded in the first visit, and the purchase is logged as a new visit. Learn more about how a visit is defined in Matomo.
- In Matomo, view the Visitors > Visits Log and Visitor Profile.
- If the cart and purchase appear in separate visits with more than a 30-minute gap, the cart will be marked as abandoned.
Tracking misconfiguration
If the Ecommerce tracking code does not execute the trackEcommerceOrder
call, or if a Tag Manager tag fails to fire on the order confirmation page, the purchase will not be linked back to the abandoned cart.
- Open your browser’s developer tools and go to the Network tab.
- Check that a
trackEcommerceOrder
request is sent when the order completes. - If you’re using Matomo Tag Manager, use the Preview / Debug Mode to verify that the tags are firing at the right time.
- Review your implementation against the Ecommerce setup guide and the Ecommerce setup for Tag Manager to confirm tracking is implemented correctly.
Tracking delays
In some cases, the Ecommerce tracking request can be delayed or blocked (for example, by network issues, JavaScript errors, or an ad blocker). If the request never reaches Matomo, the cart is logged as abandoned but the purchase is missing.
- Open your browser’s developer tools and go to the Network tab.
- Check that a request is sent to your Matomo server when the order completes, for example:
https://your-matomo-domain/matomo.php?idgoal=0&ec_id=ORD4545&revenue=199.99&ec_items=...
The key parameter isec_id
, which must contain the unique order ID (for example, ORD4545). Ifec_id
is missing or empty, Matomo cannot link the purchase back to the abandoned cart.
Server-side configuration
When Ecommerce tracking is sent from your server rather than the browser, a misconfiguration can cause completed purchases not to link correctly with the visitor’s session. For example, using a WooCommerce integration configured for server-side tracking. In this case, Matomo may record the cart as abandoned because the purchase request was not associated with the same visit.
- If you use WooCommerce or another Ecommerce platform that supports server-side tracking, review the integration settings to verify that purchase events are sent correctly and contain all required parameters.
- For advanced setups that use server-side tracking, see the guide on Ecommerce interactions using server-side tracking.
Multiple devices or browsers
If a visitor adds products to their cart on one device but then switches to another device to add cart items and complete the purchase, Matomo records two separate visits. The first visit shows the abandoned cart, while the second shows the completed purchase.
Matomo provides a User ID feature that lets you link visits from the same visitor across different devices and browsers once they log in. With User ID enabled, actions such as cart additions and purchases are tied together under a single user profile.
- You can see how this appears in the Visits Log > Visitor Profiles.
- If the abandoned cart and purchase are shown in separate visits from different devices or browsers, it is expected cross-device behaviour without a login-based identifier or a persistent cart system.
Consent changes
When integrating Matomo and a consent manager platform, there may be cases where a visitor gives consent and adds items to their cart, but later withdraws consent before completing the purchase. Matomo will then track the abandoned cart but not the completed order.
Additionally, if consent is only granted at the end of checkout, the purchase may be tracked without the earlier cart activity. This reflects the visitor’s consent choice and you can analyse how often it happens:
- Use the built-in Profilable segment condition or Custom Dimensions to filter visits by consent status.
- Review your consent manager reports to see how many visitors are revoking or denying consent during their visits. This can help distinguish tracking gaps caused by consent withdrawal from genuine cart abandonment.
Check the points above to determine whether the cart abandonment issue is technical (such as a tracking configuration) or visitor behaviour (switching devices or taking too long to finish the checkout).
View details for abandoned carts in Ecommerce > Overview or create a segment based on Revenue left in cart. You can also use the Reporting API to query Ecommerce orders, abandoned carts, and product-level metrics.