# WordPress and WooCommerce analytics

> Live analytics for WordPress: one plugin sends page views, crawler visits, 404s, sign-ins and WooCommerce orders, refunds and subscriptions, with no cookies.

Source: https://mettr.app/integrations/wordpress

## Install the plugin, paste two keys

Install **mettr** from **Plugins**, **Add New Plugin**, activate it, and paste the site's keys under **Settings**, **mettr**. The secret key can live in `wp-config.php` instead, out of the database. Nothing is sent from a local or development site.

WordPress 6.0 or later, PHP 7.4 or later, and no libraries that could clash with your other plugins.

## What you see

- **Who is on the site now**, on which page, from where: page views, scroll depth, time on page and [Web Vitals](/features/web-vitals) from the script the plugin adds, served from your own domain so ad blockers mostly let it through.
- **Crawlers**: Googlebot, Bingbot, GPTBot, ClaudeBot, SEO tools and link previews never run a script. The plugin sees them on the server, and mettr names each and keeps it apart from your visitors.
- **404s and fatal errors**, the latter by class, never the message: a broken link or a plugin update gone wrong shows the minute it happens.
- **Sign-ins and sign-ups**, and response times by what WordPress served (a post, an archive, the front page, the REST API).

Administrators are left out by default, and each of these can be turned off.

## WooCommerce, from cart to refund

- **Add to cart**, for each product.
- **Every paid order** as [revenue](/features/revenue) before tax, once however many hooks fire, credited to the customer, not to the payment gateway calling back.
- **Refunds** as revenue below zero.
- **WooCommerce Subscriptions** for MRR, ARR and churn, each subscription credited to the source of its customer's first visit.

## Your own events

```php
mettr_event( 'newsletter', array( 'list' => 'weekly' ) );
```

## No cookies, no address kept

The script sets no cookies, and mettr keeps no visitor's address: visitors are told apart by a hash that changes every day. [Privacy first](/privacy-first) explains how.

## Open source

The plugin is GPL licensed, on [GitHub](https://github.com/mettrhq/mettr-wordpress). [The full guide](/docs/wordpress).
