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.
Before you start
Section titled “Before you start”You need a MetriXs account. The plugin itself is free and fully functional; a free MetriXs plan is enough to get started.
- Go to app.metrixs.eu and sign up
- Verify your email address via the link you receive
Step 1: Add your site in MetriXs
Section titled “Step 1: Add your site in MetriXs”- Log in to the MetriXs dashboard
- During onboarding (or via Settings → Sites), add your site’s domain,
e.g.
yourdomain.com— withouthttps://and withoutwww. - Skip the manual snippet verification the dashboard suggests — the plugin verifies your site automatically in step 4
- If prompted, start a trial or pick the free plan (events require an active plan)
Step 2: Create a site API key
Section titled “Step 2: Create a site API key”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.
- In the dashboard, go to Settings → Sites
- Expand your site and find the API keys section
- Click Create API key and give it a name, e.g. “Craft”
- Copy the key (
mtx_live_...) immediately — it is shown once and cannot be retrieved later
Step 3: Install the plugin
Section titled “Step 3: Install the plugin”Install it via Composer from your Craft project root:
composer require metrixs/mx-cookieless-analyticsor install it from the Plugin Store inside the Craft control panel.
Then install the plugin itself:
php craft plugin/install mx-cookieless-analyticsStep 4: Configure the plugin
Section titled “Step 4: Configure the plugin”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.
Step 5: Verify tracking works
Section titled “Step 5: Verify tracking works”- Open your site in an incognito/private window and browse a few pages
- 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.
Settings reference
Section titled “Settings reference”| 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.
Troubleshooting
Section titled “Troubleshooting”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., nohttps://) - 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.
Uninstalling
Section titled “Uninstalling”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
Prefer no plugin?
Section titled “Prefer no plugin?”You can always add the tracker manually with the snippet from the platform guides — the plugin simply automates installation and verification.