Cookie pop-ups make visitors leave. Bots make your numbers look bigger than they are. And your stats live far away from the content you write.
This DatoCMS plugin fixes that. It shows how many real people read each record, right in the record's sidebar. Privatus Analytics counts visitors without cookies, so your website does not need a cookie pop-up, and it filters out bots.

The free plan of Privatus Analytics includes 10,000 events a month and 3 sites. No card needed.
Make a free Privatus Analytics account and add your website. Copy the site ID. It looks like pa_ABC123.
Add the tracker tag to the <head> of the website that shows your DatoCMS content:
<script defer src="https://privatusstats.com/js/pa.js" data-site="pa_YOURSITEID" data-modules="engage,auto,vitals,clicks,ask"></script>In Privatus Analytics, make an API token with read-only access (Account, API tokens). It starts with pat_.
In DatoCMS, open Configuration, then Plugins, and add Privatus Analytics from the marketplace.
Paste your site ID and API token in the plugin settings and pick a date range. Press Check connection to make sure it works.
For each model, write where its records live on your website. Put a field's API key in curly brackets:
| Model | Page path |
|---|---|
| Blog post | /blog/{slug} |
| Docs page | /{locale}/docs/{slug} |
| Home page (single record) | / |
{locale} becomes the language you are editing. Localized fields use the value for that language. Leave a model empty to hide the panel on it.
window.privatus.track(name, props). See the docs.privatusanalytics.com, straight from your browser. It has no server of its own.npm installnpm test # unit and component testsnpm run build # builds dist/index.htmlnpm run dev # serves the plugin at http://localhost:5173 for a private DatoCMS pluginTo try changes in DatoCMS, add a private plugin with the URL http://localhost:5173.
MIT, Two Phase LLC. See LICENSE.