Download the PHP package privatus/automad-privatus-analytics without Composer
On this page you can find all versions of the php package privatus/automad-privatus-analytics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download privatus/automad-privatus-analytics
More information about privatus/automad-privatus-analytics
Files in privatus/automad-privatus-analytics
Package automad-privatus-analytics
Short Description See how many real people visit your Automad site, without cookies. Adds the Privatus Analytics script to your pages.
License MIT
Homepage https://privatusanalytics.com
Informations about the package automad-privatus-analytics
Privatus Analytics for Automad
Real visitor numbers for your Automad site. No cookies, no cookie pop-up, no bots.
You want to know if people visit your Automad site. But Google Analytics uses cookies, so in many countries you must show a cookie pop-up first (the box that asks visitors to say yes to cookies). Many people click no, so they never show up in your numbers. Bots add fake visits on top.
This extension adds the Privatus Analytics script to the pages of your Automad site. You add one line to your theme and set your site ID once. Your own visits are not counted while you are logged in, unless you turn that off. The script sets no cookies and keeps no IP addresses. Bots are filtered out before they are counted.
So you see how many real people came, which pages they looked at and where they came from, on one simple dashboard. A report comes to your inbox each week, and you can set alerts for when traffic jumps or drops. And you don't need a cookie pop-up for your analytics.
Free plan, no card: 10,000 events a month (an event is a page view or an action you track) on up to 3 sites. Start free at privatusanalytics.com.
- No cookies. No cookies and no hidden IDs on your visitors' devices, and no IP addresses are kept. Laws differ by country, so check your own legal advice.
- Real people, not bots. Known bots, data centers and spam visits are left out on every plan.
- Small and fast. The script is about 3 KB when compressed.
Requirements
- Automad 2 (tested on 2.0.0-beta.68). PHP 8.2 or later.
- A Privatus Analytics site ID. It starts with
pa_. You find it in Privatus Analytics under Site settings, Tracking.
Install
In the Automad dashboard, open Packages, search for Privatus Analytics and click Install.
Or install it with Composer in the folder where Automad lives:
Setup
Add this line inside the <head> of your theme templates, just before
</head>:
You can leave siteId out and set it in the dashboard instead. Open
Shared, add a custom field named privatusSiteId and paste your site ID.
Until there is a valid site ID, the extension adds nothing to your pages.
Options
| Option | What it does |
|---|---|
siteId |
Your Privatus Analytics site ID, like pa_7Q2K9XH3AB. If it is empty, the privatusSiteId shared field is used, then the PRIVATUS_SITE_ID environment variable. A value that does not look like a site ID prints nothing. |
modules |
The extra tracking to load, separated by commas. engage is time on page and how far people scroll. auto is clicks on outside links, file downloads, forms people send and missing pages (404). vitals is page speed (Web Vitals). clicks is click maps. ask is short surveys on your site. Leave it out to load all five. Use '' to load none. |
skipLoggedIn |
true by default. People logged in to the Automad dashboard get no script, so your own visits are not counted. |
For example, to load only time on page and page speed:
With only a site ID, the extension prints:
External service
After you save a site ID, every page loads https://privatusstats.com/js/pa.js
in the visitor's browser. The script sends the page address (query parameters
are removed except campaign parameters), the referrer, the browser language, the
screen width, the time zone name and event names to
https://privatusstats.com/api/event. The visitor's IP address is read in
memory to work out a rough country and to count unique visits, and it is not
stored.
- Terms of service: https://privatusanalytics.com/legal/terms
- Privacy policy: https://privatusanalytics.com/legal/privacy
Development
License
MIT. See LICENSE.