Guide

Microsoft Clarity on WooCommerce: setup, and what it won't show

Clarity is a free way to record visits on a WooCommerce store. How to set it up properly, what it shows, and what it doesn't tell you about your orders.

Updated

The short answer

Microsoft Clarity is a free session recording and heatmap tool with an official WordPress plugin. Setting it up on WooCommerce takes a few minutes:

  • install the Microsoft Clarity plugin, sign in and pick or create a project;
  • connect your cookie banner, if you sell to the EU, the UK or Switzerland;
  • mask the WooCommerce pages that show customer details.

What it won't do out of the box is connect a recording to a WooCommerce order, its revenue or the shopper who left at the checkout. Below is how to set it up, and how to close part of that gap.

Setting up Clarity on WooCommerce

Microsoft's WordPress setup guide covers WooCommerce stores too:

  1. In WordPress, go to Plugins → Add New, search for Microsoft Clarity and install the plugin by Microsoft.
  2. Open Clarity in the admin menu and sign in.
  3. Choose an existing project or create a new one. The plugin adds the tracking code for you.

Recordings and heatmaps fill as visitors arrive. The plugin is listed on wordpress.org with over 200,000 active installations.

What Clarity shows

  • Session recordings of real visits, and click and scroll heatmaps per page.
  • Behaviour signals you can filter recordings by: rage clicks, dead clicks, excessive scrolling and quick backs.
  • Recordings where a JavaScript error was detected, as a filter — useful for watching a checkout fault happen.
  • Smart events it detects automatically, such as add to cart and begin checkout, and funnels built from events and page visits.

Privacy settings to check first

  • Masking. Clarity's masking page describes three modes — Strict, Balanced and Relaxed — and says input boxes and drop-downs are masked in all of them. Page text is another matter: WooCommerce prints the customer's name and address on the order-received page and in My Account. Mask those blocks under Settings → Masking with a CSS selector, or add data-clarity-mask="true" to them.
  • Consent. Since October 31, 2025, Clarity enforces consent signals for visitors from the EEA, the UK and Switzerland. Without one it sets no cookies, but it still collects the visit. If you want nothing recorded before a visitor agrees, load Clarity only after consent, or call Clarity's consent API with the visitor's answer.
  • Retention. Playback is kept for 30 days; favourite or label the recordings you want to keep longer.

What it won't show about your orders

Clarity is built for any website: it can detect events such as add to cart and read product details from your pages, but it has no connection to WooCommerce's orders. According to Microsoft's e-commerce documentation, its Purchases feature is available only for Shopify sites. On WooCommerce, that leaves out of the box:

  • Which recording produced which order, and how much it was worth — or which visits ended with an unpaid order.
  • Who left at the checkout. Inputs are masked, which is right for a recording, so the name and email a shopper typed before leaving are not in it — and there is no list of them to follow up.
  • Errors on your server. PHP faults and payment gateway failures happen in WordPress, not in the browser Clarity watches.

Marking purchases yourself

Clarity's JavaScript API lets a page send a custom event and custom tags. A small snippet on WooCommerce's order-received page marks the visits that bought, so you can filter recordings and build a funnel to it. Add it with a code snippets plugin or your child theme's functions.php:

add_action( 'woocommerce_thankyou', function ( $order_id ) {
    $order = wc_get_order( $order_id );
    if ( ! $order ) {
        return;
    }
    ?>
    <script>
      if (window.clarity) {
        window.clarity('event', 'purchase');
        window.clarity('set', 'payment_method', <?php echo wp_json_encode( $order->get_payment_method() ); ?>);
      }
    </script>
    <?php
} );

Send what helps you filter — the payment method, a product category — and leave out names, emails and addresses. This gives you the visits that bought; it still doesn't give you their order value or the ones that left before paying.

When you need the orders, too

StorePilot is built for WooCommerce, so it starts from what Clarity leaves out. Each checkout your consent settings allow is saved as a lead with the shopper's contact and cart before the order exists; every order and payment status arrives from WooCommerce, with the recording of the visit behind it; and JavaScript and PHP errors are grouped and marked when they block a purchase. See ecommerce analytics or install the plugin.

Facts about Microsoft Clarity are from Microsoft's documentation and the plugin's wordpress.org listing, checked in December 2026; features change, so follow the links for the current state. Microsoft and Clarity are trademarks of Microsoft Corporation. StorePilot is not affiliated with or endorsed by Microsoft.

FAQ

Questions about this guide

Is Microsoft Clarity free for WooCommerce stores?

Yes. Microsoft describes Clarity as free, and the official Microsoft Clarity plugin for WordPress is free on wordpress.org. Its API documentation mentions keeping up to 100,000 recordings per project per day, and sampling above that.

Does Microsoft Clarity track WooCommerce orders or revenue?

Not out of the box, according to Microsoft's documentation: its Purchases feature is described as available only for Shopify sites. On WooCommerce you can mark a purchase yourself with Clarity's custom event API on the order-received page.

Do I need a cookie banner for Clarity on an EU store?

Yes, in practice. Since October 31, 2025, Clarity requires a consent signal for visitors from the EEA, the UK and Switzerland. Without one it sets no cookies, but it still collects the visit without them. If you want nothing recorded before a visitor agrees, load Clarity only after consent, or pass the visitor's answer to Clarity's consent API. Check with your adviser what your country requires.

How long does Clarity keep recordings?

Microsoft's data retention page says playback data is kept for 30 days, and recordings you label or favourite for 9 months. Heatmap data is kept for 9 months.

See the order behind every recording

Install the plugin, and every visit comes tied to its WooCommerce cart, its order and the errors on the way.

Start for free

Every feature on the Free plan, for 100 visitors a month. No card required.

Choose a plan

Plans from €29 a month, priced by your monthly visitors and the websites you connect.