Skip to content
Sign inStart free trial

Craft CMS plugin

MetriXs has a first-party Craft CMS plugin that adds the tracker to every page of your site, verifies your site automatically, and stays strictly opt-in: nothing loads until you connect it. No theme editing, no Twig snippets, no consent banner.

This guide walks through the full setup, step by step.

You need a MetriXs account. The plugin itself is free and fully functional; a free MetriXs plan is enough to get started.

  1. Go to app.metrixs.eu and sign up
  2. Verify your email address via the link you receive
  1. Log in to the MetriXs dashboard
  2. During onboarding (or via Settings → Sites), add your site’s domain, e.g. yourdomain.com — without https:// and without www.
  3. Skip the manual snippet verification the dashboard suggests — the plugin verifies your site automatically in step 4
  4. If prompted, start a trial or pick the free plan (events require an active plan)

The plugin authenticates with a site-scoped API key. It only grants access to that one site (stats:read + event:write), never to your account, and can be revoked at any time.

  1. In the dashboard, go to Settings → Sites
  2. Expand your site and find the API keys section
  3. Click Create API key and give it a name, e.g. “Craft”
  4. Copy the key (mtx_live_...) immediately — it is shown once and cannot be retrieved later

Install it via Composer from your Craft project root:

Terminal window
composer require metrixs/mx-cookieless-analytics

or install it from the Plugin Store inside the Craft control panel.

Then install the plugin itself:

Terminal window
php craft plugin/install mx-cookieless-analytics

In the Craft control panel, go to Settings → Plugins → MX Cookieless Analytics:

Field What to enter
Enable tracking Leave off for now — turn on after verification
Site API key The key from step 2
MetriXs URL Leave at the default https://app.metrixs.eu
Site domain Leave empty to auto-detect from the primary site’s URL
Exclude admins On by default — users with admin access don’t count

Click Save. The plugin verifies your site automatically with the same save — you should see the green notice “site verified” (or an error message explaining what to check). Turn Enable tracking on and save again.

  1. Open your site in an incognito/private window and browse a few pages
  2. Open the MetriXs dashboard and check the Realtime view — pageviews should appear within seconds

Note: users with admin access are excluded from tracking by default. Regular logged-in users are tracked. Test from an incognito window or adjust the exclusion in the plugin settings.

How the verification works: the plugin asks the MetriXs API for a one-time challenge token, serves it from your own domain, and the API fetches it back. Only someone who controls your domain can serve the token, so this proves ownership. The token is removed again once the handshake is done.

Setting Default Meaning
Enable tracking Off Master switch — nothing loads until the site is connected and this is on
Site API key Site-scoped key from the dashboard
MetriXs URL https://app.metrixs.eu Only change for custom endpoints (HTTPS only)
Site domain Empty (auto) Must match the domain in MetriXs
Exclude admins On Don’t track users with admin access

The tracker script is served from app.metrixs.eu with a versioned URL, registered in the page head through Craft’s asset pipeline and loaded asynchronously (defer). It works fine alongside caching and CDN setups.

Verification fails

  • Make sure your site is publicly reachable over HTTPS (no maintenance mode, no firewall blocking the MetriXs servers)
  • Save the plugin settings again — the handshake runs on every save

No data in the dashboard

  • The plugin settings must have shown the “site verified” confirmation
  • Enable tracking must be on
  • The site domain must exactly match the domain in MetriXs (no www., no https://)
  • You are logged in as an admin? You’re excluded by default — test incognito

API key lost Keys cannot be retrieved after creation. Revoke the old one in the dashboard (Settings → Sites → API keys), create a new one, and update it in the plugin settings.

Configuring without the control panel The auto-verification runs on a settings save. If you prefer not to use the control panel, install the plugin anyway and verify your site manually: the dashboard shows your snippet, and MetriXs confirms ownership by detecting it on your site.

When you remove the plugin:

  • Your site is not automatically disconnected in MetriXs — revoke the API key in the dashboard (Settings → Sites → API keys) to stop ingestion
  • Your historical data stays in your MetriXs account

You can always add the tracker manually with the snippet from the platform guides — the plugin simply automates installation and verification.