Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

How to Add Google Analytics to WordPress (2 Easy Ways)

The easiest way to add Google Analytics to WordPress is Google's own Site Kit plugin. Install Site Kit from Plugins, Add New, sign in with your Google account and connect Analytics; it creates or links your property and adds the tracking code for you. The alternative is pasting your Google tag into your site's header.

Google Analytics shows you how people find your site, which pages they read and which ones lead to enquiries. Getting it onto a WordPress site used to mean copying code into theme files. Now Google has its own WordPress plugin that does it for you, which is the route I'd recommend for most small business owners.

Two ways to add Google Analytics to WordPress

MethodEffortBest for
Site Kit by Google pluginLow, no codeMost small business sites
Paste the Google tag into your headerMedium, some codeSites where you don't want another plugin
Google Tag ManagerHigherSites with lots of tracking tags

Method 1: Site Kit by Google, step by step

  1. In your WordPress admin, go to Plugins, then Add New.
  2. Search for Site Kit by Google, install it and activate it.
  3. Click Start setup and sign in with the Google account you want to use for Analytics.
  4. Allow the permissions Site Kit asks for.
  5. Choose to connect Analytics. Site Kit lets you pick an existing account and property or create new ones.
  6. Finish the setup. Site Kit adds the tracking code to your site.

Site Kit is Google's official plugin, and its plugin page describes it as setting up Google tools without editing your site's code. It also shows key numbers on your WordPress dashboard, for the whole site and for individual posts, and can connect Search Console at the same time.

Method 2: add the Google tag manually

  1. Go to analytics.google.com and create an account if you don't have one.
  2. Create a property for your website.
  3. Add a web data stream with your site's address.
  4. Copy the Google tag code Analytics gives you.
  5. Paste it into your site's header, using your theme's header settings or a header and footer code plugin.

Don't paste the code straight into your theme's files unless you use a child theme, because a theme update can wipe it.

The catch: don't add the code twice

The most common Analytics mistake on WordPress is double tracking. Someone installs Site Kit, and the theme or an old plugin is already adding the same tag. Every visit is counted twice, so your traffic looks bigger than reality and your engagement looks worse. Before you set anything up, check whether your theme settings, an SEO plugin or a developer has already added Analytics. Use one method only.

Check it's working

  1. Open your website in a private browser window.
  2. In Google Analytics, open the Realtime report.
  3. You should see at least one active user, you.
  4. Give it a day or two before trusting the normal reports.

Site Kit's plugin page points out that your website needs to be live for it to show data. A site in maintenance mode, or still on a temporary address, won't send anything useful.

Things to set up after installing Analytics

  • Mark your key actions, like contact form submissions or bookings, so you can see what drives enquiries.
  • Link Google Search Console so you can see which searches bring people in.
  • Exclude your own visits if you check your site a lot.
  • Add a cookie consent banner if the law where your visitors are requires one.

My GA4 setup checklist walks through the settings worth changing in the first week.

If you'd rather not use Google Analytics

Google Analytics is powerful but not the only option. Simpler, privacy-focused tools exist that are easier to read and need less consent management. If that appeals, see my comparison of Google Analytics alternatives.

Site Kit or the Google tag: which should you choose?

Choose Site Kit if you want everything set up for you and like seeing visits and search numbers inside your WordPress dashboard. It also connects Search Console, PageSpeed Insights and Tag Manager without touching code. Choose the manual Google tag if your site is already crowded with plugins, or if a developer looks after your tracking and prefers one place for all tags. Either way gets the same data into Google Analytics, so pick the one you'll maintain.

If your WordPress site is on WordPress.com, check what your plan allows, because plugins and custom code aren't available on every WordPress.com plan.

My verdict

For most WordPress sites, install Site Kit by Google, sign in, connect Analytics and let it add the code. It's Google's own plugin, needs no code, and puts your key numbers on your dashboard. If you'd rather avoid another plugin, add the Google tag to your header through your theme settings. Either way, use one method only, check the Realtime report, and set up your key actions so the numbers lead to decisions.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

Frequently asked questions

Why does Site Kit show no data?

Your site needs to be live, and new data takes time to appear. Check the Realtime report in Analytics first.

Do I need a Google Analytics account before installing Site Kit?

No. Site Kit can create the account and property during setup, or connect ones you already have.

Can I add Google Analytics to a WordPress.com site?

It depends on the plan, because plugins and custom code aren't available on every WordPress.com plan.

What's the easiest way to add Google Analytics to WordPress?

Install Google's Site Kit plugin and connect Analytics. It adds the code for you.

Is Site Kit made by Google?

Yes. It's the official WordPress plugin from Google.

Can I add Google Analytics to WordPress without a plugin?

Yes. Paste the Google tag into your site's header through your theme settings, ideally not into theme files directly.

Why is Google Analytics showing double traffic on my WordPress site?

The tag is probably added twice, for example by Site Kit and your theme. Use one method only.

How do I know Google Analytics is working on WordPress?

Visit your site, then check the Realtime report in Google Analytics for your visit.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.