=== Koko Analytics ===
Contributors: Ibericode, DvanKooten
Donate link: https://opencollective.com/koko-analytics
Tags: analytics, statistics, stats, koko
Requires at least: 6.0
Tested up to: 6.3
Stable tag: 1.2.2
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Requires PHP: 7.3
Privacy-friendly analytics for your WordPress site
== Description ==
Koko Analytics is a privacy-friendly analytics plugin for WordPress. It does not use any external services, so data about your visitors is never shared with any third-party company.
Furthermore, no visitor specific data is collected, only aggregated counts.
Stop sharing visitor data with third-party companies who also happen to sell ads.
Stop unnecessarily slowing down your website.
Koko Analytics lets you focus on what is important and gives you all the essential metrics, while respecting the privacy of your visitors.
### Features
- **No external services**: Any data never leaves your server.
- **No personal data** or anything visitor specific is tracked.
- **No cookies**: There is an option to not use any cookies.
- **Plug and play**: After installing and activating the plugin, stats will automatically be collected.
- **Fast**: Handles hundreds of concurrent pageviews without breaking a sweat.
- **Lightweight**: Adds only 985 bytes of data to your pages.
- **GDPR**: Compliant by design.
- **Metrics**: All the essentials: visitors, pageviews and referrers.
- **Event Tracking**: You can set up custom event tracking through [Koko Analytics Pro](https://www.kokoanalytics.com/pricing/).
- **Referrer spam:** Built-in blocklist to filter out referrer spam.
- **Cached**: Fully compatible with pages served from any kind of cache.
- **Open-Source**: Code is released under the GPL 3.0 license.
- **Tested**: Ready for PHP 8.3, but compatible down to PHP 7.3.
- **AMP**: Tracks AMP powered pages too ([official AMP plugin](https://wordpress.org/plugins/amp/) only).
### Contributing
You can contribute to Koko Analytics in many different ways. For example:
- Write about the plugin on your blog or share it on social media.
- [Translate the plugin into your language](https://translate.wordpress.org/projects/wp-plugins/koko-analytics/stable/) using your WordPress.org account.
- [Purchase Koko Analytics Pro](https://www.kokoanalytics.com/pricing/)
== Installation ==
1. In your WordPress admin area, go to **Plugins > New Plugin**, search for **Koko Analytics** and click **Install now**.
1. Alternatively, [download the plugin files](https://downloads.wordpress.org/plugin/koko-analytics.trunk.zip) and upload the contents of `koko-analytics.zip` to your plugins directory, which usually is `/wp-content/plugins/`.
1. Activate the plugin. Koko Analytics will start recording stats right away.
1. Access your analytics by browsing to *Dashboard > Analytics* in your WordPress admin area.
== Frequently Asked Questions ==
#### Does this respect my visitor's privacy?
Absolutely, nothing that could lead back to the visitor is recorded. If the visitor has "Do Not Track" enabled in their browser settings, the visitor won't be tracked at all.
#### Does this use any external services?
No, the data never leaves your website. That's (part of) what makes Koko Analytics such a great choice if you value true privacy.
### Does this set any cookies?
By default, yes. But you can easily disable this in the plugin's settings. Without cookies the plugin can still detect unique pageviews, but not returning visitors.
### Will this slow down my website?
No, the plugin is built in such a way that it never slows down your website for your visitors. If there is any heavy lifting to be done, it is done in a background process.
In fact, because the plugin does not depend on any external services it is usually much faster than third-party analytics tools.
### No pageviews are being recorded.
This is usually a file permissions issue. The first thing to check is whether the `/wp-content/uploads/pageviews.php` file exists and is writable by your web server.
### How to only use cookies after consent?
First configure Koko Analytics to not use any cookies by default.
Then configure your cookie consent plugin to add the following code for visitors that have given consent:
`
`
### How do I give users access to the dashboard page?
You can use a plugin like [User Role Editor](https://wordpress.org/plugins/user-role-editor/) to grant the `view_koko_analytics` and `manage_koko_analytics` capabilities to any user rolou can delete the plugin again after adding the capability.
### What is the definition of a "pageview"?
A pageview is defined as a view of a page on your site. If a user clicks reload after reaching the page, this is counted as an additional pageview. If a user navigates to a different page and then returns to the original page, a second pageview is recorded as well.
### What is the definition of a "visitor"?
A visitor represents the number of sessions during which your website or a specific page was viewed one or more times.
### I only see an empty page when viewing the analytics dashboard.
Koko Analytics was recently added to EasyPrivacy, a popular filter list which is used in many ad-blockers. It blocks both the tracking script and the dashboard script, but we are working with EasyPrivacy team to get this resolved.
Until then, please ensure to whitelist your own domain in your ad-blocker settings.
### How can I help fund Koko Analytics?
You can [purchase Koko Analytics Pro](https://www.kokoanalytics.com/pricing/) to help fund the plugin.
== Screenshots ==
1. Koko Analytics' dashboard to view your website statistics.
2. The settings page where you can exclude certain user roles from being counted.
3. A widget to show your most viewed posts (or any other post type) for a given period.
4. The dashboard widget to quickly show your site visits over the last 2 weeks.
== Changelog ==
#### 1.2.2 - Oct 18, 2023
First off, we would like to [introduce Koko Analytics Pro](https://www.kokoanalytics.com/2023/10/18/introducing-koko-analytics-pro/) to you.
It is a paid add-on plugin for Koko Analytics containing more complex features, like [custom event tracking](https://www.kokoanalytics.com/kb/tracking-events/).
Koko Analytics Pro is available for a [yearly price of €59](https://www.kokoanalytics.com/pricing/).
We hope you will consider becoming a Pro user as this will help us cover support and development costs for Koko Analytics.
Then, for a list of changes in this new version:
- Fix link to settings page from plugins overview page.
- Fix pagination not working because `wp_localize_script` turns everything into a string.
- Fix React warning for dashboard widget when toggling visibility more than once.
- Fix chart tooltip not showing on touch devices.
- Minor styling improvements to settings page.
- Install custom endpoint on plugin activation only.
- Add button to settings page to re-attempt custom endpoint installation.
- Move table pagination to bottom of component and add text label.
- Wrap `input[type="radio"]` in `