How to Add Google Analytics to Your WordPress Site
If you’re running a WordPress website and haven’t yet connected it to Google Analytics, you’re missing out on essential data about who visits your site, which pages they read, and how they find you. Setting it up is easier than most people expect, and once it’s running, you’ll have access to insights that can meaningfully improve your marketing.
There are three main ways to add GA4 to a WordPress site: using the official Site Kit plugin from Google, using a dedicated analytics plugin, or adding the tracking code manually. This guide explains each option so you can choose the right approach for your situation.
Method 1: Google Site Kit Plugin (Recommended for Beginners)
Site Kit is Google’s own official WordPress plugin. It connects your WordPress site directly to Google Analytics, Search Console, PageSpeed Insights, and AdSense from a single dashboard inside WordPress. It’s free and requires no coding.
To install it: log into your WordPress admin area, go to Plugins > Add New, search for ‘Site Kit by Google’, and click Install then Activate. Follow the setup wizard, which will ask you to sign in with your Google account and grant the plugin permission to connect to your Google properties. Once done, a GA4 tracking tag is added to every page of your site automatically.
The downside of Site Kit is that it can be resource-heavy and slows down some WordPress installs. If you notice any performance issues after installing it, Method 2 may be preferable.
Method 2: A Dedicated Analytics Plugin
Plugins like MonsterInsights and GA Google Analytics are lightweight alternatives that handle the tracking code without the full Google suite. MonsterInsights in particular is popular for its readable in-dashboard reports — you can see your key GA4 stats without leaving WordPress.
The setup process is similar: install and activate the plugin, then paste in your GA4 Measurement ID (found in Google Analytics under Admin > Data Streams > your stream). The plugin handles the rest. Most of these plugins have a free tier that covers the basics, with premium versions for ecommerce tracking, form tracking, and more detailed reporting.
Method 3: Manual Code or Google Tag Manager
If you’re comfortable with WordPress theme files, you can add the GA4 global site tag directly to your theme’s header.php file, or use a plugin like ‘Insert Headers and Footers’ to paste it in without editing theme files directly. Copy the full tracking snippet from GA4 (Admin > Data Streams > your stream > View tag instructions) and paste it in the <head> section.
For more flexibility, use Google Tag Manager (GTM). GTM is a free tool that lets you manage all your tracking scripts — Google Analytics, Facebook Pixel, LinkedIn Insight, and more — from one place without touching your website each time. Add the GTM container code to your site once, then manage all tags from the GTM dashboard. It’s the most scalable approach for businesses running multiple tracking tools.
Common questions.
Do I need a developer to add Google Analytics to WordPress?
Will Google Analytics slow down my WordPress site?
How do I check that Analytics is tracking correctly after installing it?
More on web design & ux.
Want a hand putting this into practice?
Book a free, no-obligation consultation with a Norwich-based specialist.
Let's put your business in a better light.
Book a free, no-pressure consultation. We'll talk through your goals and tell you honestly what we'd do — whether you work with us or not.