Step by Step Guide to Google Analytics Setup in WordPress
A beginner-friendly walkthrough for setting up GA4 in WordPress with Site Kit, verifying tracking, and avoiding common analytics mistakes.
Google Analytics setup in WordPress helps you understand where visitors come from, which pages they read, and what actions they take on your site. Without accurate tracking, you may be guessing which content, campaigns, or SEO efforts are actually working.
In this guide, you will create or use a GA4 property, connect it to WordPress with Google Site Kit, verify that data is being collected, and fix the most common setup problems. This tutorial is written for beginners who want a clean, reliable setup without editing theme files manually.
If you are still learning how analytics fits into WordPress growth, start with this related guide on checking traffic on a WordPress website so you understand what the reports will help you measure.
Prerequisites
Before you begin, make sure you have the right access and accounts. Google Analytics setup is simple, but missing permissions can slow you down.
- A WordPress administrator account.
- A Google account that you want to use for Analytics.
- Access to your website’s WordPress dashboard.
- A published website that is not blocked from search engines.
- Permission to install plugins on the site.
If you have never added a plugin before, review this beginner tutorial on how to install a plugin in WordPress before continuing.
Step 1: Create or Confirm Your GA4 Property
GA4 is the current version of Google Analytics. Your WordPress site needs a GA4 property and web data stream before it can collect website traffic data.
- Go to Google Analytics in your browser and sign in with your Google account.
- Click Admin in the lower-left corner.
- Under Account, select an existing account or create a new one.
- Under Property, create a new GA4 property if you do not already have one.
- Choose Web as the platform and enter your WordPress website URL.
- Name the data stream clearly, such as your domain name.
Checkpoint: You should see a web data stream with a Measurement ID that starts with G-. You do not need to paste this ID into WordPress manually if you use Site Kit in the next steps.
Step 2: Install and Activate Google Site Kit
Google Site Kit is the easiest official way to connect Google Analytics with WordPress. It avoids manual code placement and helps prevent common tracking mistakes caused by editing the wrong theme file.
- Log in to your WordPress dashboard.
- Go to Plugins > Add New.
- Search for Site Kit by Google.
- Click Install Now.
- Click Activate.
Checkpoint: After activation, you should see a new Site Kit menu item in the WordPress admin sidebar.
Troubleshooting: If the install button is missing, your account may not have administrator permissions. If the plugin installation fails, check whether your hosting account has enough disk space and whether plugin installs are restricted by your host.
Step 3: Connect Site Kit to Your Google Account
Site Kit needs permission to connect your WordPress site with your Google account. This step verifies ownership and allows WordPress to display analytics reports inside the dashboard.
- In WordPress, go to Site Kit > Dashboard.
- Click Start setup.
- Sign in with the same Google account you used for GA4.
- Allow the requested permissions so Site Kit can verify the site and connect Google services.
- Return to WordPress when the setup flow redirects you back.
Checkpoint: Site Kit should show that your site is connected. You may also see prompts to connect Search Console, Analytics, PageSpeed Insights, or other Google services.
Step 4: Connect Google Analytics in Site Kit
After Site Kit is connected, you need to select the correct Google Analytics account, GA4 property, and web data stream. This is where many duplicate or incorrect tracking setups happen, so review each selection carefully.
- Go to Site Kit > Settings.
- Open the Connect More Services tab if Analytics is not already connected.
- Click Set up Analytics.
- Select the correct Google Analytics account.
- Select the correct GA4 property for your WordPress site.
- Select the matching web data stream for your domain.
- Confirm that Site Kit can place the Analytics code on your site.
- Click the final setup or confirmation button to complete the connection.
Checkpoint: Site Kit should show Analytics as a connected service. Your WordPress dashboard should also start showing Analytics cards after Google has collected enough data.
Troubleshooting: If your GA4 property does not appear, confirm that you are signed in with the correct Google account. If you manage multiple websites, double-check the domain attached to the selected web data stream before saving.
Step 5: Verify That Tracking Is Working
Once Analytics is connected, test your setup before assuming everything is complete. Verification helps you catch blocked scripts, wrong properties, duplicate tags, and cookie or cache-related issues early.
- Open your WordPress website in a new browser tab.
- Visit two or three public pages on your site.
- In Google Analytics, open Reports > Realtime.
- Check whether your active visit appears in the realtime report.
- Return to WordPress and review Site Kit > Dashboard.
Checkpoint: Realtime reporting should show at least one active user if your visit is being tracked. Standard reports may take longer to populate, so do not judge the setup only by regular report screens immediately after installation.
Step 6: Avoid Duplicate Tracking and Data Mistakes
Duplicate tracking can inflate pageviews, sessions, and engagement metrics. This usually happens when Analytics is added through Site Kit and also added manually through a theme, header plugin, SEO plugin, or tag manager.
- Check whether your theme has a header scripts field that already contains a Google tag.
- Review plugins that insert tracking scripts, header code, or marketing pixels.
- Use only one main method to install Google Analytics unless you have a clear tag management workflow.
- Do not paste the same Measurement ID into multiple plugins.
- Document where tracking was installed so future editors do not add it again.
Checkpoint: Your site should have one clean GA4 implementation. If reports look unusually high after setup, duplicate tracking should be one of the first things you investigate.
For sites that also rely on Google Search Console, you can connect search performance data alongside Analytics. This guide on adding Google Search Console to WordPress is a useful next step after Analytics is working.
Step 7: Review Privacy, Consent, and Access
Analytics data can include information about user behavior, traffic sources, device categories, and location patterns. Treat your setup as part of your website’s privacy and compliance workflow.
- Update your privacy policy to mention Google Analytics if required for your site.
- Review your cookie notice or consent banner if your audience or region requires one.
- Give Analytics access only to users who need it.
- Use role-based access instead of sharing one Google login across multiple people.
- Remove former employees, contractors, or agencies from Analytics and WordPress when their work ends.
Checkpoint: Your website should clearly disclose analytics usage where appropriate, and only trusted users should have access to reports or settings.
Your WordPress Analytics Setup Is Ready
You have now created or selected a GA4 property, installed Site Kit, connected Google Analytics to WordPress, verified tracking, and reviewed the most common setup mistakes. This gives you a reliable foundation for measuring traffic, content performance, and marketing results.
Next, give GA4 time to collect data, then review your top pages, traffic channels, and engagement reports on a regular schedule. A clean analytics setup is not just a technical task; it is the starting point for better SEO, stronger content decisions, and smarter website growth.
Further Reading
- Google Analytics WordPress Guide
- Analytics Setup for WordPress and Google Analytics
- Install Google Analytics on WordPress
- WordPress SEO Beginner Guide



