The VeritaMetrics plugin for WordPress
Count your pages without opening a theme file. Install the plugin, paste your site id under Settings, then VeritaMetrics, and the next visitor is counted. A theme update cannot remove it, which is the way the functions.php snippet stops working.
Where to get it today
The plugin is not in the WordPress.org plugin directory yet. Submission is a human process with a review queue measured in weeks, and we will not put a date on something we do not control. Until it is listed, ask us for the zip and install it by upload. Everything below describes the plugin as it ships today.
Install it
- In wp-admin, open Plugins, then Add New, then Upload Plugin. Choose the zip and install.
- Activate it on the Plugins screen.
-
Open Settings, then VeritaMetrics, and paste your Site ID. It is on the
Site settings page of your VeritaMetrics dashboard and looks like
1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d. - Save.
- Open your own site in a private window, then look at your VeritaMetrics dashboard. The visit appears within a few seconds.
The plugin needs WordPress 6.3 or newer and PHP 7.4 or newer. 6.3 is the floor because the script is enqueued with the loading strategy WordPress added in that release, which is what defers it so it never holds up your page.
What each setting does
| Setting | What it does |
|---|---|
| Site ID | The one field that has to be filled in. Clear it later and the plugin stops loading the script without being deactivated. |
| Tracking domain | Prefilled with www.veritametrics.com. Leave it unless we have given you another host. |
| Leave out | Which signed-in people go uncounted, decided by what somebody can do rather than by what their role is called, so a renamed or custom role is judged on the same terms. A new install leaves out anyone who can edit posts. Signed-out visitors are always counted. |
| Optional signals | Page speed records how fast each page loaded and responded for real visitors. Intent signal scores a visit as it happens and fires one browser event when it looks like a lead. Both are off until you switch them on, because each one adds work to your visitor's browser. |
| API key | Optional, and the only setting that turns anything on outside your pages. Paste a read-only key and your WordPress dashboard gets a widget. Leave it empty and everything above still works. |
Scroll depth, click tracking and the rage-click and dead-click checks are set per site in your VeritaMetrics dashboard rather than here. The script carries those settings down with it, so a change in your dashboard reaches the site without touching WordPress.
Why your own visits are missing
A new install leaves out anyone who can edit posts, so the hours you spend reading your own site do not become its traffic. That covers contributors, authors, editors and administrators on a stock install, and it is checked by what the person can do rather than by the name of their role, so a custom role is judged on the same terms.
This is the commonest reason a new install looks broken: you save the site id, reload your site, and your dashboard stays empty. Open the site in a private window instead. If you would rather count everything, set Leave out to "Count every visit", and remember that your own reloads are then part of your numbers.
Consent
When a consent plugin on your site supports the WP Consent API, this plugin asks it for the
statistics category and loads the tracking script only once that category is allowed.
Complianz, CookieYes and Real Cookie Banner all answer that question.
Withdrawal is honoured rather than noted. When a visitor revokes statistics, the script stops where it stands: the events it had queued are dropped, and the page view this load already reported is retracted. Allow it again and counting resumes on the same page load.
With no consent plugin installed, or one that does not implement the API, WordPress has made no statement about statistics and the script loads. Whatever WordPress answers, nothing at all is recorded for a visitor whose browser sends Global Privacy Control or Do Not Track.
The category is statistics rather than statistics-anonymous. The WP
Consent API defines the anonymous category as storage that does not allow identification of
particular individuals, and the visit id we compute does not clear that bar on a reading we
would be willing to make on your behalf.
Whether your site needs a banner depends on where you and your visitors are, and this plugin does not answer that question. What it can tell you is what happens mechanically: the script sets no cookie, it reads none, and it asks the Consent API whenever your site provides one. Our privacy policy sets out what VeritaMetrics records and how long it is kept.
The wp-admin widget
Create an API key in your VeritaMetrics dashboard with the analytics:read scope, link
it to this site alone, and paste it into API key. Your WordPress dashboard
then shows pageviews, visitors and your busiest pages for the last seven days, next to
everything else you open wp-admin for. The full report stays in your VeritaMetrics dashboard,
and the widget links to it.
This is the one part of the plugin that talks to VeritaMetrics from your server rather than from a visitor's browser, and it does so only while an administrator has wp-admin open. The answer is held for fifteen minutes, so a dashboard load usually costs no request at all, and a number here can lag your VeritaMetrics dashboard by up to that. Your pages are untouched: no visitor ever waits for this.
Read this before you paste a key. WordPress has no secret store, so the key sits in your database as plain text and travels with any dump or backup of it. We bound what that costs rather than pretend otherwise: the key is read-only, it is tied to one site, it can be given an expiry date, revoking it in your VeritaMetrics dashboard takes effect at once, and it is never printed into any page WordPress serves. If it is stolen, the holder can read this one site's reports until you revoke it. That is why the widget is something you switch on rather than part of setting the plugin up.
What the plugin does not do
It does not proxy the script or the beacon through your own domain. Some plugins in this category route both through the site being measured, which stops a content blocker from recognising the request and recovers the visits it would otherwise drop. A visitor who installs a blocker has said what they want, and honouring Global Privacy Control while working around blockers would contradict itself. The cost is real and it is ours to carry: visitors running a blocker go uncounted here and are counted by a tool that proxies, so our numbers read lower than that tool's on the same site.
It does not rebuild your reports inside WordPress. One summary widget, then a link to the full report. Anything more duplicates a surface that already exists and has to be kept correct twice.
It stores no analytics in your database. What it writes is the settings row you save on its own screen, plus, with the widget switched on, a cached copy of the numbers that widget shows. Deleting the plugin removes both and leaves nothing else behind. Your analytics live in your VeritaMetrics account, so delete them there if you want them gone, and revoke the API key as well, because deleting a copy of a key does not stop the key working.
Moving from the functions.php snippet
Take the snippet out as you activate the plugin. Running both puts two tracking script tags on the page and every pageview is counted twice, which looks plausible in your reports and is wrong. The same goes for a snippet pasted into a header and footer plugin, or a Custom HTML tag in Google Tag Manager.
Nothing else changes. The plugin loads the same script the snippet loads and records the same things, so your history stays comparable across the switch. The three snippet routes are documented at Install VeritaMetrics on WordPress, and they still work if you would rather keep the code in a child theme you version-control.
When nothing shows up
- Check who you are signed in as. A new install leaves out anyone who can edit posts, so your own visits go uncounted while you are logged in. Open the site in a private window.
- Check the Site ID against the Site settings page of your dashboard. A site id that belongs to another site sends the data somewhere you are not looking.
- View the page source and look for a script tag carrying
data-site-id. If there is no such tag, either the Site ID field is empty or a consent plugin on the site has not been given thestatisticscategory yet. - Check your consent plugin. Allow statistics, reload the page, and look for the script tag again.
- Check your optimisation plugin. The script is enqueued rather than printed into
the page, which is what lets caching and optimisation plugins see it. A plugin set to combine
or delay every script can move ours too. Exclude the handle named
veritametricsif you find it has.
A page cache does not break the counts. The decision about whether a visitor may be tracked is made again in the browser, so a cached page served to somebody with different consent still does the right thing, and the people left out by Leave out are signed in, which every page cache we know of serves uncached.
Explore the documentation
Jump to another guide.