Connect Google Analytics 4 with WordPress
GA Google Analytics Pro adds Google Analytics tracking to WordPress pages through a lightweight settings-based workflow. It is designed for site owners who want to connect a Google Analytics 4 property without building tracking code into their theme manually. The plugin includes the features available in the free version and adds advanced controls for managing codes, consent choices, placements, and exclusions.
To begin with Google Analytics 4, create a GA4 account and obtain its tracking, or measurement, ID. Enter that ID in the plugin’s GA Tracking ID setting, select GA4 as the tracking method, and save the changes. Google Analytics may require 24–48 hours before collected data becomes visible in the account.
Paid features for more control
- Visitor Opt-Out Box: add a frontend interface that lets visitors opt in or out of Google Analytics tracking.
- Multiple tracking codes: configure more than one tracking code for supported tracking requirements.
- Live previews: preview configured tracking codes before applying them.
- Flexible placement: choose the location of multiple tracking codes and add custom code in the header or footer.
- Selective exclusions: disable tracking for logged-in users, specific post IDs, user roles, post types, search results, and post archives.
- Opt-out display options: show the visitor box automatically or place it with a shortcode.
- Inline help: use complete inline documentation while configuring the plugin.
- Priority plugin help and support: access the support level identified for the Pro version.
Tracking and configuration options
GA4 is the recommended tracking method. The plugin also lists Universal Analytics and Legacy Tracking methods, although the source identifies those options as deprecated or disabled by Google. Additional tracking support includes Display Advertising, Enhanced Link Attribution, IP Anonymization, Force SSL, Google Optimize, Consent Signals, and Tracker Objects for Universal Analytics. Links and conversions can also be tracked through the Custom Code setting.
Tracking code can be included in the header or footer and across WordPress web pages. The settings page uses toggling panels, and the tracking code can be customized with your own markup. The plugin can work with or without the Gutenberg Block Editor, and it includes an option to disable tracking for admin-level users or enable page tracking in the WordPress Admin Area.
Practical workflow
Use the Pro controls when a single site needs separate tracking codes, different placement choices, or carefully limited tracking coverage. For example, exclusions can help prevent tracking for selected content types or roles, while the opt-out box provides a visible frontend control for visitor preferences. Google Analytics remains the place to view site statistics; the plugin inserts the required tracking code rather than displaying analytics reports in WordPress.
Installation
Add GA Google Analytics Pro to your WordPress installation and activate it. Open its settings, enter the GA4 measurement ID, select GA4, configure the tracking and exclusion options you need, then save. If code does not appear, check that the theme includes the wp_head and wp_footer hooks and clear any caching plugin cache.