PopUp for Google Analytics
This plugin removes Google Analytics load and creates popup where user can choose collection or not, this will improve loading times on Lighthouse, PageSpeed Insights and also on GTMetrix because analytics.js script file is not loaded.
by Finland93 · github.com/finland93/googleanalytics-speedboost · 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/finland93/googleanalytics-speedboost/archive/refs/heads/main.zipReadme
GoogleAnalytics-SpeedBoost
Improve your Lighthouse / PageSpeed / GTmetrix scores by not loading Google Analytics until the visitor consents. The plugin shows a small consent popup and only injects the GA tag after the visitor clicks Accept — and lets them withdraw consent later.
Features
- GA loads only after consent (better performance and privacy).
- Configurable popup text and Accept/Reject button labels.
- No jQuery — a few KB of vanilla JS.
- Withdraw consent anywhere with the
[ga_consent_reset]shortcode. - The popup only appears once a GA Measurement ID is configured.
Setup
- Activate the plugin.
- Go to GDPR Popup in the admin menu and enter your GA Measurement ID (e.g.
G-XXXXXXXXXX). - Optionally customise the popup text and buttons.
What changed in 2.0.0
- Removed the jQuery dependency. 1.0 enqueued jQuery even though the script was pure vanilla JS — counter-productive for a speed plugin.
- Hardened consent handling. Cookies are parsed exactly (no substring false matches) and written with
SameSite=Lax. The GA ID is validated on save. - Added consent withdrawal via
[ga_consent_reset](a GDPR requirement that 1.0 lacked). - The popup and scripts now load only when a GA ID is set, plus basic dialog accessibility and nicer default styling.
License
GPLv2 or later — see LICENSE.
Author: Finland93
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| release | Jun 29, 2026 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.