Analytics Head
Analytics Head is a deliberately simple WordPress plugin for Google Analytics. No dashboards, no Google account connection, no feature creep — just the tracking code, placed exactly where you want it. Why use this plugin? Lightweight — a handful of options, minimal overhead, no external dependencies Easy — paste your GA4 Measurement ID (G-XXXXXXXXXX) and you are done Head placement by default — required for Google Search Console verification via Analytics Flexible — footer placement, role-based hiding, Consent Mode v2, optional Google Ads IDs Developer-friendly — filters and actions to customize output without forking the plugin Unlike heavyweight analytics suites, this plugin does one job well: inject the standard gtag.js snippet into your site. Features Google tag / GA4 Measurement ID support (GT-…, G-XXXXXXXXXX) Additional tracking IDs for separate destinations (e.g. Google Ads AW-) Legacy UA- ID acceptance (with admin notice to migrate) Code in by default (optional footer placement) Tracking never injected in wp-admin Hide tracking for administrators on the front end Hide tracking per user role Google Consent Mode v2 defaults (for GDPR / cookie plugins) Keep settings on uninstall (optional) Developer hooks and filters External services This plugin connects to Google Analytics (via Google Tag Manager / gtag.js) to provide website analytics. When: on public front-end page views only (never in the WordPress admin area), unless tracking is hidden for the current visitor by plugin settings What is sent: standard Google Analytics measurement data (for example page URL, referrer, browser/device information, and IP-derived location), processed by Google Who receives it: Google LLC / Google Analytics Terms of Service: https://marketingplatform.google.com/about/analytics/terms/us/ Privacy Policy: https://policies.google.com/privacy You are responsible for informing visitors (for example in your privacy policy) and, where required, obtaining consent. Suggested privacy policy text is also offered under Settings → Privacy when the plugin is active. Requirements WordPress 6.3 or later (compatible with WordPress 7+) PHP 7.4 or later Examples Filter tracking IDs add_filter( 'pp_google_analytics_head_tracking_ids', function( $ids ) { // Add a separate destination only — not a second ID for the same Google tag. $ids[] = 'AW-123456789'; return $ids; } ); Change Consent Mode defaults (PHP) add_filter( 'pp_google_analytics_head_consent_defaults', function( $defaults ) { $defaults['wait_for_update'] = 2000; $defaults['region'] = [ 'PL', 'DE', 'US-CA' ]; return $defaults; } ); Grant consent after the user accepts cookies (JavaScript) Call this from your consent plugin callback or custom banner “Accept” handler. Update all four types that this plugin sets to denied by default: gtag('consent', 'update', { analytics_storage: 'granted', ad_storage: 'granted', ad_user_data: 'granted', ad_personalization: 'granted' }); If you only want basic analytics (not ads), grant analytics and keep ads denied: gtag('consent', 'update', { analytics_storage: 'granted', ad_storage: 'denied', ad_user_data: 'denied', ad_personalization: 'denied' }); Modify the inline gtag config add_filter( 'pp_google_analytics_head_inline_script', function( $script, $ids ) { $script .= "gtag('event','page_view');"; return $script; }, 10, 2 );
Controls for Contact Form 7 (Redirects, Analytics & Tracking)
NEW: Subscribe to the 🚀 PRO version for advanced analytics and tracking features, and professional support by the plugin author. This is an addon for the Contact Form 7 plugin with the following features: Track form submissions, errors and completions with Google Analytics (GA4), Google Tag (gtag.js), Google Tag Manager (GTM), Matomo (formerly Piwik) and Facebook Pixel. Redirect to URL on form submission. Enable native WordPress shortcodes in form content. Disable AJAX form submissions. Disable default form CSS. Disable automatic paragraph formatting. Disable HTML5 input field types or enable the HTML5 input type fallback. Specify the Google reCAPTCHA language. Store form submissions in Storage for Contact Form 7 or TablePress. Please note that some settings work on the per-page level and will apply to all forms on the same page. For example, disabling AJAX form submissions for one form will disable AJAX submissions on all forms on the same page. Requirements Contact Form 7 version 4.3 or later for features related to submission tracking and redirects. Usage The plugin adds a new “Controls” tab for each Contact Form 7 form in the WordPress administration area. Form Submission Storage Setup the official companion plugin Storage for Contact Form 7 plugin for capturing the form submissions safely in the WordPres database. Alternatively, there is also a basic integration with the TablePress plugin. Select the TablePress table where to store the form submissions. The plugin will add any missing columns for each form field, and append the form entries as rows to the table. Additionally, fields cf7_time (submission time as ISO 8601) and cf7_url (URL where the form was submitted) are stored along with the form data. Analytics Tracking The plugin automatically triggers analytics events for the following services: Google Analytics (GA4) using Google Tag Manager and Global Tag (gtag.js) with ga(), _gaq.push() and dataLayer.push() implementations, Matomo (formerly Piwik), Facebook Pixel Conversion Tracking. It passes the following data with the event: “Contact Form” as the event category, “Submit”, “Sent”, “Error” or “Spam” as the event action, and the form title as the event title. Facebook Pixel The standard Contact event is used for Facebook Pixel with content_category property set to the event type (Submit, Sent, Error, Spam) and content_name set to the form title. Contribute Report issues and suggest improvements on GitHub. Add a translation to your language.