---
slug: wordpress-plugin
title: "How do I set up Metrunio in WordPress and WooCommerce?"
category: installation
locale: en
updated: 2026-10-16
keywords: ["WordPress","WooCommerce","plugin","multisite","Polylang","WPML","WP-Cron","Action Scheduler","WORDPRESS_SNIPPET_INACTIVE","WORDPRESS_REPORTS_STALLED"]
questions: ["How do I install and connect the Metrunio plugin for WordPress?","What stays on my orders when I uninstall?","Where do I get the WordPress plugin?","WooCommerce plugin","Download the WordPress plugin","Install the WordPress plugin","WooCommerce tracking plugin","Add Metrunio to WooCommerce","Connect WordPress to Metrunio","Order reports from WooCommerce are stuck","Measurement is switched off on the WordPress website","Does the plugin work without WooCommerce?","Does the plugin run in a multisite network?","Does the plugin work with Polylang or WPML?","Multilingual website with one domain per language","When does a WooCommerce order count as a purchase?","What happens to the plugin on a staging copy?"]
url: https://bench.metrunio.com/en/help/wordpress-plugin
---

# How do I set up Metrunio in WordPress and WooCommerce?

**How do I install and connect the Metrunio plugin for WordPress?**

You install the “Metrunio” plugin in WordPress, click “Connect to Metrunio” under “Settings → Metrunio” and confirm the website in the portal. From then on the plugin measures visits and takes the consent decision from your consent tool. With WooCommerce it also reports orders, cancellations and refunds straight from the server.

## What you need

- WordPress 6.9 or newer with PHP 7.4 or newer. For orders, WooCommerce 11.0 or newer; without WooCommerce the plugin measures visits and campaigns.
- A Metrunio account with a website and a concluded data processing agreement. Before that, Metrunio accepts nothing.
- The website’s domain among the addresses of that website in Metrunio, as its main address or an allowed domain. The portal only returns there after authorisation. If your WordPress administration runs on a different domain, add that one too.
- A user account that may change settings, usually an administrator.

## Setting it up

1. Download the free “Metrunio” plugin in the portal under “Setup assistant”. Upload the file under “Plugins → Add New Plugin → Upload Plugin” and activate the plugin.
2. Open “Settings → Metrunio” and click “Connect to Metrunio”. The portal opens: sign in, choose the website and confirm.
3. You are taken back to WordPress. The status line names the connected website.
4. Under “Consent”, check which tool the plugin has detected, or choose it yourself. Save.
5. Open the website in a private window, accept in the banner and visit two pages. They appear in the live test in the portal.

In a multisite network you connect each website on its own. Each measures into the website you choose when connecting.

With Polylang or WPML and one domain per language, the plugin adds the domains of all languages as allowed domains when you connect, up to ten. If a language gets its own domain later, add it in the portal under “Setup → Websites and allowed domains” or connect again. Until then, Metrunio accepts nothing from that domain.

## What the plugin measures

| What | From where | When |
| --- | --- | --- |
| Page views and consent | snippet on every page of the website | only after the decision in the banner |
| Purchase, only with WooCommerce | from the server as soon as the order is placed: “Processing”, “On hold” or “Completed” | with consent, linked to the visits; without a decision in the banner with the order number, without browser, customer or advertising identifiers, not attributed; after a refusal the same, but only with an activated additional instruction for revenue reconciliation |
| Cancellation and refund, only with WooCommerce | from the server on the status change or the refund | a cancellation as a refund of the open amount, a partial refund for its amount |
| Subscription orders from WooCommerce Subscriptions (from 1.0.1) | from the server, with the subscription ID | the first order like any purchase; every renewal as a renewal without a decision and without identifiers, measured and never attributed |
| Link between purchase and visits | identifier from the session, which the plugin attaches to the order | only with consent for analytics |

An order counts as soon as it is placed, with the time someone clicked “Place order”. If it stays at “Pending payment”, for example because someone abandons payment at PayPal, it is not a purchase. That way the figures match WooCommerce Analytics.

Amounts go out in the order’s currency. The plugin takes the cost of goods from WooCommerce’s “Cost of Goods Sold” feature, but only if every product line has a value. If one is missing, the field stays empty.

## When the portal shows a finding

| Finding | Cause | What you do |
| --- | --- | --- |
| WORDPRESS_SNIPPET_INACTIVE | Measurement on the website is switched off in the plugin settings. Visits do not arrive; WooCommerce orders still do, but without the visits before them. | Switch it on under “Settings → Metrunio” and save. |
| WORDPRESS_REPORTS_STALLED | Order reports have been waiting in the shop for more than an hour. Usually WP-Cron is not running. | Check whether `DISABLE_WP_CRON` is set, and if so set up a cron job on the server. Orders that were not reported can be sent again from the plugin settings. |

## Limits

- Without WooCommerce, the plugin does not report enquiries from forms. Create a goal step in the portal for them.
- Orders you create in the administration have no session and therefore no consent. They count towards revenue but are not attributed to any channel.
- The plugin does not report changes to an order after the purchase. A cancelled order you reopen stays refunded in Metrunio.
- If you refund an order after cancelling it, the plugin does not report the refund again. The cancellation has already refunded the open amount.
- A partial refund without selected lines has no split into net value and cost of goods. The order is then left out of the contribution margin totals; the reports say how many there are.
- With a multi-currency plugin, Metrunio converts foreign currencies at the daily rate, not at the plugin’s rate.
- Amounts go to Metrunio with two decimal places. In a currency with three, such as the Kuwaiti dinar, the third is rounded.
- Order reports run on WP-Cron. On a website without visitors, or with WP-Cron switched off and no cron job on the server, they wait.
- A renewal from WooCommerce Subscriptions is created without a visit. It goes out without a consent decision and is therefore never attributed. If one order starts several subscriptions (different billing periods in one cart), it carries no subscription ID.
- If the keys in `wp-config.php` change, the plugin can no longer read its stored connection. Release the old connection in the portal under “Data connections” with “Release connection”, then connect again. Until then, Metrunio refuses a second connection for the same website.
- Your data stays in Metrunio after an uninstall. If Metrunio cannot be reached while you uninstall, the connection remains. You then release it in the portal under “Data connections” with “Release connection”; the Admin role can do this.
- When you uninstall, Metrunio’s details on your orders stay in place (order meta `_metrunio`: the visit and session identifiers and the consent state). They belong to the order in your shop, and if you install the plugin again, it reports refunds of earlier orders with their consent state.
- If you copy the website including its database, for example for staging, the copy takes the connection with it. The plugin notices the different address and measures nothing there until you deactivate it. If you move the website, disconnect in WordPress after the move and connect again; you release the old connection in the portal under “Data connections”.
- With WPML the plugin reads the domains of the languages according to the WPML source code. After connecting, check under “Setup → Websites and allowed domains” whether all domains are listed, and add any missing ones there with “Add domain”.

## Also asked

- What stays on my orders when I uninstall?
- Where do I get the WordPress plugin?
- WooCommerce plugin
- Download the WordPress plugin
- Install the WordPress plugin
- WooCommerce tracking plugin
- Add Metrunio to WooCommerce
- Connect WordPress to Metrunio
- Order reports from WooCommerce are stuck
- Measurement is switched off on the WordPress website
- Does the plugin work without WooCommerce?
- Does the plugin run in a multisite network?
- Does the plugin work with Polylang or WPML?
- Multilingual website with one domain per language
- When does a WooCommerce order count as a purchase?
- What happens to the plugin on a staging copy?

## Related

- https://bench.metrunio.com/en/help/consent-bridge
- https://bench.metrunio.com/en/help/consent-tool-verbinden
- https://bench.metrunio.com/en/help/shopsysteme
- https://bench.metrunio.com/en/help/server-events-api
- https://bench.metrunio.com/en/help/erstattungen
- https://bench.metrunio.com/en/help/abo-folgezahlungen
- https://bench.metrunio.com/en/help/erlaubte-domains
- https://bench.metrunio.com/en/help/health-center
