Description
Statistikwerk shows you how many people visit your website, which pages they read and where they come from – without cookies and without storing IP addresses. That is why you do not need a cookie banner for it.
This plugin connects your WordPress site to Statistikwerk. It adds the small tracking script to every page, so you do not have to touch your theme, and shows an overview of the last 30 days on your WordPress dashboard.
- One-click setup: connect with Statistikwerk, log in or create a free account, done
- Overview on the WordPress dashboard: visitors, pageviews, bounce rate, visit duration and a chart of visitors and pageviews for the last 30 days
- Content statistics: rankings by category, author and tag, and pages shown with their titles
- AI visibility: see how many visitors come from AI assistants (ChatGPT, Perplexity, Claude, Gemini, Copilot) and how often AI crawlers such as GPTBot, ClaudeBot or PerplexityBot read your pages
- No cookies, no stored IP addresses, data hosted in Switzerland
- Designed for the Swiss Data Protection Act (nDSG/revFADP) and the GDPR
- Works with every theme and page builder (Gutenberg, Elementor, Divi, Bricks, Thrive …)
- Logged-in editors and administrators are not counted (optional)
- Protected against optimisation plugins that would break the script (LiteSpeed Cache, WP Rocket, Autoptimize, Cloudflare)
- Lightweight: one small script, loaded with
defer
Statistikwerk is a service. You need a free account at statistikwerk.ch to see your statistics.
External services
This plugin connects to Statistikwerk, a web analytics service operated by ieWerk, Switzerland. It is needed to count the visits to your website and to show the overview on the dashboard.
Counting visits. As soon as a site ID is saved, the plugin adds the script https://statistikwerk.ch/s.js to every public page of your website. When a visitor opens a page, the visitor’s browser loads this script and sends the following data to https://statistikwerk.ch/e.php:
- the site ID
- the address of the page (without the part after
#) - the referring page (referrer)
- the width of the browser window
- when the visitor leaves or hides the page: how many seconds the page was visible
The browser also transmits its IP address, user agent and language settings, as with every web request. Statistikwerk does not store the IP address; it is only used to derive the country and an anonymous daily visitor hash that changes every day. Of the language settings, only the main language code (for example “fr”) is stored. No cookies are set. The browser’s local storage is only used if you, the site owner, exclude your own browser from counting.
Connecting (optional). Only when an administrator clicks «Connect with Statistikwerk», the browser is sent to https://statistikwerk.ch/verbinden/wordpress with the address of your site, the site title, the WordPress time zone and the address to return to. After confirming, your WordPress server sends a one-time code to https://statistikwerk.ch/api/v1/connect/token and receives a read-only access key for this one website.
Dashboard overview (only when connected). Your WordPress server requests the figures of the last 30 days from https://statistikwerk.ch/api/v1/summary with the access key, at most every 15 minutes while the dashboard is viewed. Only aggregated numbers are received; nothing about your visitors or WordPress users is sent. Disconnecting or deleting the plugin sends a request to https://statistikwerk.ch/api/v1/token to delete the access key.
Page information (only when connected, can be switched off). Once a day, your WordPress server sends the path, title, author name, address of the author page, categories, tags and publication date of your published posts and pages to https://statistikwerk.ch/api/v1/pages with the access key. This is the same information that is public on your website. It is used to show statistics by category, author and tag.
AI crawler counts (only when connected, can be switched off). When a known AI crawler (for example GPTBot, ClaudeBot or PerplexityBot) requests a page, the plugin counts it in your WordPress database. Once an hour, your WordPress server sends the daily totals to https://statistikwerk.ch/api/v1/crawlers with the access key: the date, the name of the crawler, the path of the page and the number of requests. No IP addresses and no data about visitors or WordPress users are sent.
Nothing is sent before a site ID is saved or a connection is made.
- Terms of use: https://statistikwerk.ch/agb
- Privacy policy: https://statistikwerk.ch/datenschutz
Screenshots



Installation
- Install and activate the plugin.
- Go to Settings Statistikwerk and click «Connect with Statistikwerk».
- Log in or create a free account, choose your website (or add it) and confirm.
- Done. The page cache of common caching plugins is cleared automatically. If your host or a CDN such as Cloudflare also caches pages, clear that cache as well.
You can also skip the connection and paste the site ID (or the whole snippet) from the setup page at statistikwerk.ch. Visits are counted in the same way; only the dashboard overview needs the connection.
FAQ
-
Not for Statistikwerk: it sets no cookies and stores no IP addresses or other personal data. Mention Statistikwerk in your privacy policy anyway.
-
Where are my visits counted?
-
On the Statistikwerk servers in Switzerland. You see the full statistics after logging in at statistikwerk.ch, and an overview on your WordPress dashboard once the site is connected.
-
Who sees the dashboard overview?
-
Administrators. With the filter
statistikwerk_widget_capabilityyou can choose another capability, for exampleedit_postsfor editors. -
Are my own visits counted?
-
By default, logged-in editors and administrators are not counted. You can change this in the settings.
-
Why are no visits counted yet?
-
Open your website in a private browser window without logging in, because logged-in editors and administrators are not counted by default. If still nothing arrives, your pages are probably cached: visitors then get pages from before the installation, without the tracking script. The plugin clears the cache of common caching plugins (LiteSpeed Cache, WP Rocket, W3 Total Cache and others) automatically. Caches of your host (for example WordPress.com) or of a CDN such as Cloudflare have to be cleared in their dashboard, or they expire on their own after a few hours.
-
Can I exclude certain pages?
-
Yes, with the filter
statistikwerk_should_track. Returnfalsefor pages that should not be counted. -
How are AI crawlers counted?
-
AI crawlers do not run JavaScript, so the tracking script cannot see them. When your site is connected, the plugin recognises known AI crawlers by their user agent on your server, counts their page requests per day and sends these daily totals to Statistikwerk once an hour. You can switch this off in the settings. Pages delivered from a page cache do not reach WordPress and are therefore not counted.
-
How do I disconnect?
-
In WordPress under Settings Statistikwerk «Disconnect», or at statistikwerk.ch on the setup page of your website. Deleting the plugin also removes the connection.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Statistikwerk” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Statistikwerk” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.6.1
- When the site ID changes, the page cache of common caching plugins is cleared automatically, so all pages are counted right away.
- The settings page shows the version number.
- In the plugin list, the links to the author and the plugin website open in a new tab.
1.6.0
- Page information: also sends the address of the author page, so Statistikwerk can link to it in the author statistics.
1.5.0
- Page information: titles, authors, categories and tags of published posts and pages are sent once a day, so Statistikwerk can show statistics by category, author and tag. Can be switched off in the settings.
1.4.0
- AI visibility: counts page requests by AI crawlers (GPTBot, ClaudeBot, PerplexityBot and others) and shows them in Statistikwerk. Can be switched off in the settings.
1.3.0
- Dashboard overview: two-coloured bars show visitors and pageviews per day, with a legend.
1.2.1
- Dashboard overview: note when part of the data is hidden (open invoice or monthly pageview limit exceeded).
- Translations are now provided by translate.wordpress.org; the bundled translation files were removed.
1.2.0
- Connect with Statistikwerk in one step: log in or create an account, choose the website, done. The site ID is filled in automatically.
- Overview of the last 30 days on the WordPress dashboard.
- Disconnect in the settings; deleting the plugin also removes the connection.
1.1.0
- Ready for translation, English base texts with German translation included.
- Setup guide with links to create an account and add a website.
- Script is added with the WordPress function
wp_print_script_tag.
1.0.0
- First version.
