Analytics Without Cookies
Use basic Google Analytics 'universal' tracking without setting a cookie
by Barry Ceelen · github.com/barryceelen/wp-analytics-without-cookies · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/barryceelen/wp-analytics-without-cookies/archive/refs/heads/master.zipDeclares an update source (https://github.com/barryceelen/wp-analytics-without-cookies), so updates arrive through the plugin's own updater.
Readme
Google Analytics without setting a cookie
Uses the fingerprint2.js script to try and create a more or less unique identifier for a visitor. This will reduce the accuracy of your metrics as opposed to using Google's own methods, which may or may not be good enough for your tracking purposes.
Upside is that no tracking cookies are created which is nice if you are concerned about showing a cookie consent warning for your tracking script. Tracking is harmless, right?
It does add about 30KB page weight for the fingerprint2.js script, which you may or may not like.
Setting your analytics tracking ID
There is no settings page for this plugin. Set your own tracking id by adding a filter:
add_filter( 'analytics_without_cookies_tracking_id', function() { return 'UA-XXXXXXX-XX'; } );
Your visitor's IP adresses are anonymized by default
Turn IP anonymization off if you are so inclined:
add_filter( 'analytics_without_cookies_anonymize_ip', '__return_true' );
Logged in users are not tracked by default
Track logged in users:
add_filter( 'analytics_without_cookies_ignore_logged_in_users', '__return_false' );Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| v1.1.0 | Sep 20, 2016 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.