Title: MetricRaven Analytics
Author: metricraven
Published: <strong>November 16, 2026</strong>
Last modified: November 16, 2026

---

Search plugins

![](https://ps.w.org/metricraven/assets/banner-772x250.png?rev=3805764)

![](https://ps.w.org/metricraven/assets/icon-256x256.png?rev=3805764)

# MetricRaven Analytics

 By [metricraven](https://profiles.wordpress.org/metricraven/)

[Download](https://downloads.wordpress.org/plugin/metricraven.1.0.3.zip)

 * [Details](https://wordpress.org/plugins/metricraven/#description)
 * [Reviews](https://wordpress.org/plugins/metricraven/#reviews)
 *  [Installation](https://wordpress.org/plugins/metricraven/#installation)
 * [Development](https://wordpress.org/plugins/metricraven/#developers)

 [Support](https://wordpress.org/support/plugin/metricraven/)

## Description

[MetricRaven](https://metricraven.com) shows where your visitors come from and which
of those channels make money. This plugin adds the MetricRaven tracker to your WordPress
site without editing theme files.

 * **One field to set up.** Paste your site ID and every front-end page is tracked.
 * **Cookieless by default.** Nothing is stored in the visitor’s browser until your
   consent banner grants it. Works with the WP Consent API (Complianz, CookieYes
   and other compatible banners).
 * **Excludes your own visits.** Logged-in administrators, or any roles you pick,
   are not tracked.
 * **Built-in proxy.** Optionally serve the script and events from your own domain
   so fewer visits are lost to ad blockers.
 * **WooCommerce revenue attribution.** Saves the visitor ID on each order as hidden`
   _metricraven_visitor_id` meta, so the MetricRaven WooCommerce webhook credits
   revenue to the visit’s source, campaign and landing page.
 * **Content-Security-Policy friendly.** Add a nonce with the `metricraven_csp_nonce`
   filter. Nonces that security plugins add through `wp_inline_script_attributes`
   are kept.
 * **Lightweight.** One deferred script, no dashboard widgets, no database tables.

### External services

This plugin connects your site to MetricRaven (https://metricraven.com), a third-
party web analytics service run by MetricRaven. Nothing is loaded or sent until 
you enter a site ID in Settings  MetricRaven, and logged-in users with excluded 
roles (administrators by default) are never tracked.

**Tracker script and analytics events.** On every front-end page view by a tracked
visitor, the visitor’s browser loads `https://metricraven.com/js/script.js` (or 
the same file through this site in built-in proxy mode) and sends events to `https://
metricraven.com/api/v1/collect`: page views, time spent on the page, clicks on links
to other sites (host and path) and any custom events or goals you add. Each event
carries your site ID, the page URL (including campaign parameters such as `utm_source`
and `?ref=`), the referrer and a timestamp; the request itself carries the visitor’s
IP address and browser user agent. MetricRaven uses the IP address to look up country
and city and to derive a daily visitor ID, and does not store it. Until the visitor
consents (see the Consent setting), nothing is stored in the browser; with consent,
a random visitor ID is kept in a first-party cookie and localStorage for a year 
and sent with each event.

**Built-in proxy mode.** When you choose “This WordPress site”, your server downloads`
script.js` from MetricRaven at most once an hour (cached in a transient) and forwards
each event the browser posts to `/?mrp=event` to `https://metricraven.com/api/v1/
collect`, adding the visitor’s IP address, user agent, origin and referrer so location
and device are recorded correctly.

**WooCommerce.** With revenue attribution on, the plugin saves the visitor ID on
each order. The plugin itself sends no order data. Order details (amount, currency,
status, line items, customer email and the saved visitor ID) reach MetricRaven only
if you add the MetricRaven webhook under WooCommerce  Settings  Advanced  Webhooks,
which WooCommerce then delivers.

 * Terms of service: https://metricraven.com/legal/terms
 * Privacy policy: https://metricraven.com/legal/privacy

## Screenshots

[⌊Settings → MetricRaven.⌉⌊Settings → MetricRaven.⌉[

Settings  MetricRaven.

## Installation

 1. In WordPress, go to **Plugins  Add New** and search for “MetricRaven”, or upload
    the plugin zip under **Plugins  Add New  Upload Plugin**.
 2. Activate the plugin.
 3. Go to **Settings  MetricRaven**, paste your site ID (from MetricRaven  Settings
    Tracking & install) and save.
 4. Purge any page cache, open your site in a private window and check the visit appears
    in your MetricRaven dashboard.

#### WooCommerce

 1. In MetricRaven, open Settings  Integrations  WooCommerce and copy the webhook URL
    and secret.
 2. In WooCommerce  Settings  Advanced  Webhooks, add a webhook for **Order updated**
    with that delivery URL and secret, API version 3.
 3. Keep **Revenue attribution** on in Settings  MetricRaven.

## FAQ

### Does it use cookies?

Not by default. Until the visitor consents, MetricRaven derives a daily visitor 
ID on its servers and stores nothing in the browser. Choose “Follow the WP Consent
API” or call `analytics.setConsent(true)` from your banner to keep a visitor ID 
across days.

### How are WooCommerce orders attributed without cookies?

Once the cart has items, the plugin saves the visitor ID in the WooCommerce session
that the cart already uses, and the classic checkout also sends it in a hidden field.
No extra cookie is set.

### My own visits still show up

Excluded roles only apply while you are logged in. To exclude a browser permanently,
run `localStorage.ana_ignore = "1"` in its developer console.

### A caching or optimization plugin broke tracking

Plugins that combine or delay JavaScript can drop `data-*` attributes. Exclude `
script.js` (or the `?mrp=script` URL in proxy mode) from combining and delaying.

### Can I add other tracker attributes?

Use the `metricraven_script_attributes` filter, for example to add `data-allow-localhost`
on a staging site. `metricraven_should_track` turns tracking off for any request.

### What does uninstalling remove?

Deleting the plugin removes its settings and script cache. The `_metricraven_visitor_id`
meta stays on past orders as part of their history.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“MetricRaven Analytics” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ metricraven ](https://profiles.wordpress.org/metricraven/)

[Translate “MetricRaven Analytics” into your language.](https://translate.wordpress.org/projects/wp-plugins/metricraven)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/metricraven/), check
out the [SVN repository](https://plugins.svn.wordpress.org/metricraven/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/metricraven/) by
[RSS](https://plugins.trac.wordpress.org/log/metricraven/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.3

 * Removed the custom script host setting: the tracker loads only from metricraven.
   com or through this site’s built-in proxy.

#### 1.0.2

 * Security: the WooCommerce visitor ID request checks a nonce.
 * Security: the built-in proxy accepts events only from this site and validates
   the JSON body before forwarding it.
 * The proxy exits early on requests without its query variable.

#### 1.0.1

 * Tested with WordPress 7.1.
 * Translations load through WordPress.org language packs (removed the manual load_plugin_textdomain
   call).
 * Readme: full External services disclosure.

#### 1.0.0

 * First release: tracker, role exclusion, consent modes, built-in proxy, custom
   host, WooCommerce attribution, CSP nonce support.

## Meta

 *  Version **1.0.3**
 *  Last updated **17 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [analytics](https://wordpress.org/plugins/tags/analytics/)[privacy](https://wordpress.org/plugins/tags/privacy/)
   [revenue](https://wordpress.org/plugins/tags/revenue/)[statistics](https://wordpress.org/plugins/tags/statistics/)
   [woocommerce](https://wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://wordpress.org/plugins/metricraven/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/metricraven/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/metricraven/reviews/)

## Contributors

 *   [ metricraven ](https://profiles.wordpress.org/metricraven/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/metricraven/)