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' ); } );
Machete
Machete is a simple suite of tools that solves common WordPress annoyances using as few resources as possible. Machete doesn’t cover every single use case, but there is a huge amount of sites that would require less plugins if they used Machete. All Machete tools have two things in common: they solve problems faced by many web developers and they do it using as few server resources as possible. So far, Machete includes the following tools: WordPress Optimization WordPress places a lot of code inside the tag just to keep backward compatibility or to enable optional features. You can disable most of it and save some time from each page request while making your installation safer. Cookies & GDPR Warning We know you hate cookie warning bars. Well, this is the least hateable cookie bar you’ll find. It is really light, doesn’t affect your PageSpeed score and plays well with static cache plugins. Analytics and custom code You don’t need a zillion plugins to perform easy tasks like inserting a verification meta tag (Google Search Console, Bing, Pinterest), a json-ld snippet or a custom stylesheet (Google Fonts, Print Styles, accessibility tweaks…). The Google Analytics and Google Tag Manager tracking codes are PageSpeed optimized, GPDR friendly. Maintenance mode The maintenance mode that ships with WordPress is just a basic lock-down that is activated whenever you do a major update. With machete Maintenance Mode you can hide your unfinished page from visitors and search engines, give your clients a secure temporary access and lock your site without affecting your SEO. Post & Page cloner Adds a “duplicate” link to post, page and most post types lists. Also adds “copy to new draft” function to the post editor. Social Sharing Buttons Social sharing done the Machete way. The icons are made as a custom webfont embedded in a minified CSS file that only weighs 5.8KB. The sharing actions use each platform’s native share URL. WooCommerce Utils WooCommerce was designed to work for every possible use case, but that often leads to unexpected behavior. These simple fixes can improve the WooCommerce user experience by making it behave as clients expect.