Minimal GA4 Tracker
Lightweight GA4 tracking without the bloat.
by Breon Williams · github.com/breonwilliams/minimal-ga4-tracker
★ 0stars
6release downloads
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/breonwilliams/minimal-ga4-tracker/releases/download/v1.1.6/minimal-ga4-tracker-1.1.6.zipFrom the readme
Minimal GA4 Tracker
Lightweight Google Analytics 4 tracking for WordPress without the bloat.
Features
- Simple setup with just your GA4 Measurement ID
- Async script loading for optimal performance
- Option to disable tracking for administrators
- Automatic exclusion of admin pages, feeds, previews, REST API, AJAX, and cron
- Developer-friendly with filter hooks for customization
- GitHub-based auto-updates
Installation
From GitHub Releases
1. Download the latest release ZIP from the Releases page
2. In WordPress admin, go to Plugins Add New Upload Plugin
3. Upload the ZIP file and activate
Manual Installation
1. Clone or download this repository
2. Copy the minimal-ga4-tracker folder to /wp-content/plugins/
3. Activate through the Plugins menu
Configuration
1. Go to Settings GA4 Tracker
2. Enter your GA4 Measurement ID (e.g., G-XXXXXXXXXX)
3. Optionally check "Disable for Administrators" to exclude admin tracking
4. Save changes
Find your Measurement ID in Google Analytics: Admin Data Streams select your stream.
Developer Hooks
mga4gtagconfig Filter
Modify the gtag configuration parameters:
Custom Events
Track custom events using the standard gtag function:
C
Read the full README on GitHub →