Install MetricMind on WordPress

Install the free WPCode plugin, paste the MetricMind script tag into its Header box, clear your site's cache, then open your site.

Before you start. On WordPress.com, installing a plugin needs a paid plan (Personal, Premium, Business or Commerce). Free WordPress.com sites have to upgrade first.

Add the tag

Replace YOUR_SITE_ID with your site's ID. In MetricMind, open your site, then Settings → Setup. The ID is in the header of the Install it yourself panel, and the Script tag tab there shows the tag with your ID already filled in.

  1. In your WordPress admin, go to Plugins → Add New. Newer versions may call it Add Plugin.
  2. Search for WPCode. It was formerly called Insert Headers and Footers. Click Install Now, then Activate.
  3. Go to Code Snippets → Header & Footer.
  4. Paste the tag into the Header box.
    <script src="https://cdn.metricmind.si/mm.js" data-site="YOUR_SITE_ID" defer></script>
  5. Click Save Changes, at the top right.
  6. If you use a caching plugin or your host caches pages, clear the cache.

Check that it works

  1. Open your live site in a normal browser window, with ad blockers off, and load a page or two.
  2. In MetricMind, open your site's Settings → Setup page. The panel at the top says Waiting until the first page view arrives, then Live. It usually takes under a minute. Reload the page if it hasn't changed.

Still on Waiting?

  • An ad blocker in your browser. Some block analytics. Test with extensions off.
  • A different address. Events are accepted from the domain you registered in MetricMind, its www. version and its subdomains. To test on another address, such as your platform's free or staging domain, add it under Settings → Security → Allowed origins.
  • Local testing. The script ignores localhost and private addresses, so test on the live site.
  • The tag didn't arrive. View your page's source and search for mm.js. If it's there, open your browser's developer tools: [MetricMind] Missing data-site in the Console means the tag lost its ID, and in the Network tab /v1/batch should answer 202.

What goes wrong on WordPress

Cached pages don't have the tag yet

A page saved in a cache is served as it was before you added the tag. If mm.js isn't in your page's source, clear the cache in your caching plugin or at your host, then look again.

Speed plugins can hold the script back

WP Rocket's Delay JavaScript execution keeps scripts from loading until the visitor moves the mouse, scrolls or presses a key, so someone who reads and leaves isn't counted. Add mm.js to its Excluded JavaScript Files box. Use the file name, not the domain: with minifying on, WP Rocket hosts outside scripts on your own server, so the domain wouldn't match. Other speed plugins usually have a similar exclusion setting.

The tag lives in the plugin

WPCode adds the code only while it's active. If you deactivate it, tracking stops. WPCode's exports don't include the Header box either, so keep a copy of the tag when you move a site.

Privacy

MetricMind sets no cookies and builds no profiles. In the EU, storing an ID on the device can need consent even without cookies, so for the strictest reading turn on storage-free mode (data-storage="none"), which stores nothing in the browser. Your obligations depend on your jurisdiction and the rest of your stack, so check with your counsel.

To turn on storage-free mode, add data-storage="none" to the tag before defer. What changes in that mode.

Next

  • To leave out your own visits, open https://yoursite.com/?mm_optout=1 once in each browser you use (=0 turns it back on).
  • Page views, sources, contact clicks, site search, Web Vitals and errors are collected without more setup. To count your own actions, see events.

Sources

The steps and plan rules come from these pages, as of November 2026. Platforms change their menus, so tell us if something has moved.