Install MetricMind with Google Tag Manager
Create a Custom HTML tag with the short loader below, fire it on Initialization - All Pages, and publish your container. If you can edit your site's <head>, the plain script tag is simpler.
Before you start. Your site needs a Google Tag Manager container already installed.
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.
- Go to tagmanager.google.com and open your container.
- Go to Tags, choose New, and name the tag
MetricMind. - Click Tag Configuration, then Custom HTML.
- Paste this into the HTML field. Leave Support document.write off.
<script> (function () { var s = document.createElement("script"); s.src = "https://cdn.metricmind.si/mm.js"; s.defer = true; s.setAttribute("data-site", "YOUR_SITE_ID"); document.head.appendChild(s); })(); </script> - Under Triggering, choose Initialization - All Pages, then save the tag.
- Click Preview, enter your site's address and click Connect. Your tag should appear as fired in Tag Assistant.
- Click Submit, keep Publish and Create Version selected, and click Publish. Nothing goes live before this.
Check that it works
- Open your live site in a normal browser window, with ad blockers off, and load a page or two.
- 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
localhostand 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-sitein the Console means the tag lost its ID, and in the Network tab/v1/batchshould answer 202.
What goes wrong on Google Tag Manager
Why not the plain script tag
Tag Manager is known to strip custom attributes from elements in a Custom HTML tag, or refuse to save them, and mm.js reads your site ID from its data-site attribute. Google's docs don't cover this, so we rely on published reports of it. The loader sets the attribute in JavaScript, which works either way.
Consent
By default this tag fires for everyone. To hold it back until a visitor agrees, open the tag's Advanced Settings → Consent Settings, choose Require additional consent for tag to fire under Additional Consent Checks, and add a consent type such as analytics_storage. The check happens when the trigger fires, so if your banner records the choice later, use Preview to see that the tag fires after a visitor accepts.
A tag manager adds a dependency
MetricMind then loads only if Google's container loads, so whenever it's blocked or fails, nothing is measured. Your visitors' browsers also contact Google to fetch the container, which belongs in your own privacy review. Anyone who can publish the container can change or remove the tag. If your site uses a Content Security Policy, it has to allow this inline code too: Google recommends a nonce. Also allow cdn.metricmind.si in script-src and in.metricmind.si in connect-src.
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 the line s.setAttribute("data-storage", "none"); to the loader, next to the data-site line. What changes in that mode.
Next
- To leave out your own visits, open
https://yoursite.com/?mm_optout=1once in each browser you use (=0turns 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.
- Google: Custom tags
- Google: Page view triggers
- Google: Preview and debug containers
- Google: Publishing, versions and approvals
- Google: Tag Manager consent mode support
- Google: Using Tag Manager with a Content Security Policy
- Simo Ahava: Add HTML elements to the page programmatically (2018, on stripped attributes)