Koko Analytics – Privacy-Friendly WordPress Analytics
Koko Analytics is a privacy-friendly and lightweight Google Analytics alternative for WordPress sites. It is a plug and play solution to get GDPR compliant insights into your website visitors without requiring any third-party services. Why choose Koko Analytics? Important insights Koko Analytics provides you with simple and effective analytics. There are no complicated reports to dig through. All the important metrics are visible from a quick glance at your analytics dashboard, right inside your WordPress admin. Privacy-friendly analytics Koko Analytics is a privacy-friendly solution for WordPress. It can be used without any cookies, no personal data is processed or stored and nothing is shared with any third-party. That makes it suitable for GDPR, CCPA, and PECR-compliant website statistics. Lightweight website statistics Koko Analytics is lightweight. It adds less than 1 kilobyte of data to your pages and is fully compatible with all kinds of caching setups. WordPress is bypassed entirely for its collection endpoint, making the impact on your site’s performance as close to zero as possible. Open source analytics Koko Analytics is open source released under the GPL license, just like WordPress itself. The source code is publicly available. Everyone has the right to run, study, share or modify the source code. Features WordPress analytics dashboard – View your website statistics directly inside WordPress admin. Top posts and pages – See which content gets the most visits. Referrer statistics – Find out which websites send traffic to your site. Path-based tracking – Track statistics for any URL, including archives and search pages. Returning visitor detection – Reliably detect returning visitors without cookies. Exclusion rules – Exclude visits from selected WordPress user roles or IP addresses. Historical data imports – Import statistics from Jetpack Stats, Plausible Analytics, Burst Statistics, Statify, WP Statistics, Independent Analytics, or SlimStat Analytics. Automatic data cleanup – Remove historical data older than a chosen number of months or years. Popular posts output – Show your most visited posts or pages with a widget, Gutenberg block, or shortcode. Pageview counter – Show the total number of pageviews for a page with a shortcode or Gutenberg block. Koko Analytics Pro Koko Analytics Pro adds more reporting options for sites that need deeper analytics. Country statistics – See which countries your visitors come from. Technology reports – View browser, operating system, and device statistics. Email reports – Receive periodic analytics reports in your inbox. UTM Campaigns – Measure the performance of your marketing campaigns. Custom event tracking – Track outbound link clicks, contact form submissions, add-to-cart actions, and more. Traffic spike alerts – Get notified by email when traffic changes quickly. View the Koko Analytics live demo or see Koko Analytics Pro pricing.
Lightweight Google Analytics
This simple plugin adds Google Analytics 4 (GA4) to your WordPress site using your Measurement ID. It prints Google’s standard gtag.js snippet, nothing more, with a few options for where it loads, who gets tracked, privacy and testing. Features Performance focused with no bloat and never any upsells Only needs your GA4 Measurement ID (G-XXXXXXXX) Load the tracking code in the header or footer Exclude logged-in users by role (admins, editors and authors are excluded by default) Post previews and the Customizer are never tracked Option to disable Google’s advertising features (Google signals) Google Consent Mode v2 support for GDPR/CCPA compliance with cookie consent plugins Debug Mode for testing in GA4 DebugView Optional Minimal Analytics 4 mode: a 3.5 KB inline script that reports page views, scrolls, downloads, outbound clicks and site searches without loading gtag.js at all The settings page tells you whether tracking is live and why your own visits may not show up Works with WP Rocket’s local Google Analytics feature Filters for developers to change the gtag config, the consent defaults or when tracking is skipped The plugin does not include any reporting. To see your statistics, open Google Analytics. Note: Universal Analytics (UA-) was shut down by Google in 2023 and is no longer supported. If you still have a UA- ID saved, the plugin outputs nothing until you enter a GA4 Measurement ID. For developers Change the options passed to gtag("config", ...), for example to disable the automatic page view or set cookie flags: add_filter( 'lightweight_ga_gtag_config', function ( $config, $measurement_id ) { $config['send_page_view'] = false; $config['cookie_flags'] = 'SameSite=None;Secure'; return $config; }, 10, 2 ); Change the Consent Mode defaults, for example to only deny storage for EU visitors: add_filter( 'lightweight_ga_consent_defaults', function ( $defaults ) { $defaults['region'] = array( 'AT', 'BE', 'DE', 'FR', 'IE', 'NL' ); return $defaults; } ); Skip the tracking code for any request: add_filter( 'lightweight_ga_disable_tracking', function ( $disabled ) { return $disabled || is_page( 'internal-dashboard' ); } );