Installation
One line in your page, a check that it works, and what to do when it does not.
Paste the script
Paste this snippet before the closing head tag or at the end of body. The position makes no difference to the result, because the defer attribute delays execution until the document is ready anyway.
<script defer data-domain="your-domain.com" src="https://assets.metuno.com/js/ws.js"></script> The data-domain value must be exactly the domain you added in the panel. The collector uses it to recognise the site and drops events from domains it does not know, so a typo means silence rather than an error.
Check that it works
- Open your site in a new tab.
- Open the Realtime view in the panel. You should see yourself within a few seconds.
- If nothing appeared, open developer tools, the network tab, and reload the page. Look for a request to
assets.metuno.com.
Nothing shows up
Tabelle seitlich scrollen, um die übrigen Spalten zu sehen.
| What you see | What it means |
|---|---|
| No request for the script | The snippet did not reach the page, or a browser extension is blocking it. Check the page source and try a private window with no extensions. |
| Script loads, no event request | Usually Do Not Track or Global Privacy Control is on. The script deliberately sends nothing then. Check in another browser. |
| Event goes out, panel is empty | The domain in data-domain does not match the one added in the panel. Compare them character by character, including any prefix. |
| Console warning about a missing data-domain | The attribute was lost while copying, or a content management system stripped it. Some editors remove unknown attributes from pasted code. |
| It worked and stopped | Check in the panel whether the site passed its monthly pageview allowance. Once it runs out, collection pauses until the end of the month. |
Single page applications
You need to add nothing. The script listens for pushState, replaceState, popstate and hashchange, so moving to another view without a reload counts as another pageview. This holds for every router, because they all use the same browser mechanisms.
If your application keeps view state in the query string and changes it often, you will see many variants of the same path in reports. That is not a measurement error, it reflects what the application does.
Visitors without JavaScript
Some visitors have JavaScript switched off and the script never runs for them. This tag records a pageview for such visits: the browser fetches the image and sends the page address in the Referer header along the way.
<noscript><img src="https://assets.metuno.com/px.gif" referrerpolicy="unsafe-url" alt="" width="1" height="1" /></noscript> This measurement records the path, browser, system and country. It does not record where the visit came from, because without a script there is nothing to read that from, so such visits land in direct traffic. It also records no time on page and no speed metrics.
What the script does not do
- It stores no cookies and nothing in browser storage.
- It reads no canvas, no font list, no screen resolution and nothing else used to build a device fingerprint.
- It loads no other scripts and has no dependencies.
- It sends nothing when the Do Not Track or Global Privacy Control header is on.
- It does not query the browser about itself, so it triggers no layout recalculation and does not change your page speed scores.