by Andy Feliciotti on WordPress.org

Plugin settings page for Lightweight Google Analytics
This simple plugin adds Google Analytics 4 (GA4) to your WordPress site using your Measurement ID. Additional features include the ability to change the tracking code position, disabling display features, anonymize IP, and excluding roles from tracking.
Note: Universal Analytics (UA-) was discontinued by Google on July 1, 2023. This plugin still supports UA tracking IDs for backwards compatibility, but we recommend migrating to Google Analytics 4 (G-XXXXXXXX) for active tracking.
Features
This plugin uses Google Analytics 4 (gtag.js) tracking code by default. Universal Analytics (analytics.js) is still supported for backwards compatibility. It does not include any built in reporting — to view your site statistics, visit Google Analytics after installing.