PGO
← News

PGO / ARTICLE

How to Add Google Analytics 4 to Your Blog and Check That It Works

How to add Google Analytics 4 to your blog: create the property, copy the G- ID, connect it to WordPress and confirm data in Realtime.

Graphic with the words Google Analytics 4 on a deep navy and gold background

To add Google Analytics 4 to your blog, create a GA4 property with a web data stream, copy the Measurement ID that starts with “G-“, paste it into your site through a plugin or your platform’s Google Analytics field, then confirm in the Realtime report that visits are arriving. Google says data collection can take up to 30 minutes to start.

Here is the process from start to finish, the one setting people forget and how to read your first numbers without getting lost.

What Google Analytics does, and what it does not

Google Analytics counts visits to your site and shows where they come from, which pages they read and what they do next. It does not rank your pages and it will not bring you traffic by itself. It tells you what is already happening, so you can decide what to write next.

It also does a different job from Search Console. Search Console shows how your site appears in Google Search (queries, impressions, indexing). Analytics shows what visitors do once they arrive. Use both. If you have not set up Search Console, start with how to add your website to Google Search Console.

Step 1: Create the property and data stream

  1. Sign in to Google Analytics with a Google account you will keep long term. Avoid a throwaway account, because losing access later is painful.
  2. Create an account for your site, then create a property. This is the container for your site’s data.
  3. Add a web data stream and enter your site address and a name.
  4. When the stream is created, you will see a Measurement ID that looks like G-XXXXXXXXXX. You can find it again later in the Admin area under Data streams, on the stream’s details page.

Google’s setup pages sometimes tell you to click Configure tag settings on the web stream details page to find the “G-” ID. Either route leads to the same ID.

Step 2: Put the ID on your site

How you do this depends on your platform. Google’s own help page for CMS hosted sites says that many platforms accept the “G-” ID directly. For a self hosted WordPress blog, you have three common routes:

  • A plugin that accepts the G- ID. Google lists Site Kit, its own WordPress plugin, and MonsterInsights from Awesome Motive as supporting the “G-” ID. Install the plugin, follow its setup and paste or select your ID.
  • Your SEO plugin or theme. Some have a Google Analytics field. If yours does, paste the ID there.
  • Custom code. You can paste the tag snippet that Google gives you into your site’s head section, usually through a header scripts option. Use native support where you can, because manual code is easier to break.

Pick one method only. If you add the tag twice, through a plugin and through code, you will count every visit twice and your numbers will be unreliable. If you are on WordPress.com, Google notes that adding Analytics is a feature of certain paid plans, so check your plan.

Step 3: Check that it works

  1. Open your blog in a private browser window, or on your phone using mobile data.
  2. In Google Analytics, open the Realtime report.
  3. You should see at least one user within a few minutes. If not, wait up to 30 minutes before you start troubleshooting, as Google advises.

If nothing appears after that, check these in order:

  • The ID has no spaces and starts with G-, not UA- (an old Universal Analytics number).
  • The tag is not added twice.
  • A caching plugin is not still serving an older version of your pages. Clear the cache.
  • An ad blocker in your own browser is not hiding your visit. Test from a clean browser or another phone.
  • You are not testing while logged in as an admin, if your plugin excludes logged in users.

Do not forget the privacy side

Analytics collects data about visitors, so you should say so on your site. Add a clear line in your privacy policy that you use Google Analytics. If you also run ads, my guide on the privacy policy for a blog with AdSense shows what to include. Depending on where your visitors are, you may need to consider consent rules too, so check the requirements that apply to your audience.

What to look at first

A new Analytics screen can be overwhelming. In the first weeks, only watch a few things:

  • Which pages get visits. These tell you which topics to build on.
  • Where visitors come from. Search, social, direct or other sites.
  • Which countries and devices they use. If most visitors are on phones, check your site on a phone.
  • Engagement on your best pages. Do people stay, or leave straight away?

Avoid reading too much into a handful of visits. Small numbers jump around. Look at weekly trends, not single days. And never use traffic you bought or generated yourself to make the chart look better, because on an ad supported site that can cause real trouble. See AdSense invalid traffic for why.

Connect it to your improvement routine

Once Analytics is working, pair it with a simple monthly routine: find your five most visited posts, improve them, add internal links to related posts and write one new post on a topic your readers already like. My guides on internal linking and keyword research for a new blog help with the next steps.

Common questions

Is Google Analytics free?

Google offers a standard version that you can use at no cost to track a site. Check Google’s current terms for any limits that apply to your use.

What is the difference between UA and G- IDs?

An ID starting with G- is the Measurement ID for Google Analytics 4. Older IDs starting with UA- belong to the previous version, Universal Analytics, which you should not use for new setups.

How long until data appears?

Google says it may take up to 30 minutes for data collection to start. The Realtime report is the quickest way to verify.

Do I need a plugin?

No, but a plugin that accepts the G- ID is the safest route for most bloggers. Manual code works if you are careful.

Will Google Analytics improve my rankings?

No. It measures your traffic. It does not change your rankings, but what you learn from it can help you improve your content.

Why are my numbers different from Search Console?

They measure different things. Search Console counts clicks from Google Search results, while Analytics counts sessions and users from all sources, so the totals will not match.


Source: Google’s Analytics Help page, Set up data collection for a CMS-hosted website.

Share

Share this article.