Add privacy-first analytics to your WordPress site
Set up Measure on WordPress without a plugin. Works with any theme, WooCommerce, Elementor and Kadence. No cookies, so no cookie banner needed for Measure.
WordPress powers 43% of the web. It also has a significant analytics problem: the usual cookie-based tools come with a consent banner, bundled stats suites do too much, and most WordPress analytics plugins are bloated or expensive.
Measure works on WordPress with a single script tag. No plugin required. No cookies, nothing stored on the visitor’s device, so no cookie banner is needed for it. And an MCP server that lets your AI tools query your site data directly.
Setup: no plugin required
Method 1: Theme functions.php
Add this to your theme’s functions.php (or a child theme):
function add_measure_analytics() {
$tracking_id = 'YOUR_TRACKING_ID'; // from your Measure dashboard
echo '<script defer src="https://lets.measure.events/api/script/' . esc_attr($tracking_id) . '"></script>';
}
add_action('wp_head', 'add_measure_analytics');Method 2: WordPress Customizer
Go to Appearance → Customize → Additional CSS / Scripts (location varies by theme) and paste:
<script defer src="https://lets.measure.events/api/script/YOUR_TRACKING_ID"></script>Method 3: Insert Headers and Footers plugin
If you use the free Insert Headers and Footers plugin:
- Go to Settings → Insert Headers and Footers
- Paste the script tag in the Header section
- Save
WooCommerce, forms and conversions
Measure tracks pageviews and time on page — there’s no JavaScript API for custom events. That turns out to cover most WordPress conversions, because they already land on their own page:
- WooCommerce purchases land on the order-received page (
/checkout/order-received/…). Its pageviews are your purchase count. - Product views are just pageviews of your
/product/…URLs. - Contact Form 7, Elementor and other forms can redirect to a
/thankspage on success — most form plugins have a redirect setting — and that page’s pageviews are your form submissions.
Excluding admin traffic
Avoid tracking your own visits:
function add_measure_analytics() {
// Don't track logged-in admins
if (is_user_logged_in() && current_user_can('manage_options')) {
return;
}
$tracking_id = 'YOUR_TRACKING_ID';
echo '<script defer src="https://lets.measure.events/api/script/' . esc_attr($tracking_id) . '"></script>';
}
add_action('wp_head', 'add_measure_analytics');Why not a typical cookie-based tool?
WordPress sites in the EU usually show a cookie consent banner if they use cookie-based analytics. That banner typically reduces traffic visibility by 20-40% (users clicking “reject all”). Measure uses no cookies, stores nothing on the visitor’s device, and doesn’t store IP addresses or user-agent strings — visitors are counted with a daily-rotating salted hash — so a cookie banner isn’t needed for Measure. For anything beyond that, talk to your counsel.
| Measure | Typical cookie-based tool | Bundled stats plugin | |
|---|---|---|---|
| Cookie banner needed | Not for Measure | Usually, in the EU | Varies |
| Script size | A couple of KB | Tens of KB | Bundled (heavy) |
| Humans, AI agents and bots counted separately | ✅ | Rarely | Rarely |
| Price | $29/mo for 40 sites | Varies | Varies |
| AI-queryable | ✅ MCP server | Usually ❌ | ❌ |
| Setup time | 5 minutes | 30 minutes | Requires account |
Connecting to Cursor or Claude
Once your data is flowing, add the Measure MCP server (https://lets.measure.events/mcp, with an mk_ API key) to your AI coding tool and ask questions like:
- “Which blog posts got the most traffic this week?”
- “What’s my top referral source?”
- “How many people reached the order-received page yesterday?”
Your AI assistant can answer these directly from your live analytics data.
Measure is $29/month for 40 sites, then $0.50 per site per month, with a 14-day trial at lets.measure.events.
Let your agent read the numbers.
$29 a month covers 40 sites, then $0.50 a site. 14-day trial.