Facebook Pixel

How to set up Google Analytics 4 on your website?

How to add Google Analytics 4 code to your website (and where to find it)

Google Analytics 4 looks and works differently from Universal Analytics, so it can feel unfamiliar at first. In the video below, you’ll see exactly where to find the code (your Google tag / Measurement ID) and what you need to add to your website so GA4 can start tracking.

Universal Analytics is no longer collecting data, so you don’t need to keep it running. Focus on getting GA4 installed correctly and then check that your tracking is working.

I recorded this video to show you how to add the GA4 code to your WordPress website.

For other platforms, please follow the links:

Once you’ve added the GA4 code to your website, it’s important to check that it’s actually working. A very common mistake is pasting the code in the wrong place or assuming it’s tracking without verifying it.

The easiest way to check is inside Google Analytics itself. Log into your GA4 property and go to the Realtime report. Then open your website in a new browser tab and click around a few pages. If everything is set up correctly, you should see activity appearing almost immediately.

If you don’t see any data, don’t panic. Double-check that you’ve copied the correct Measurement ID (it starts with G-) and that it’s been added only once to your website. Using both a theme setting and a plugin at the same time can cause duplicate tracking.

For WordPress websites, it’s usually best to add GA4 using either a trusted plugin or your theme’s built-in analytics field, rather than pasting code directly into files. This reduces the risk of it breaking during theme updates.

It’s also worth giving GA4 a little time. While Realtime data should appear straight away, standard reports can take up to 24 hours to fully populate. This is normal and doesn’t mean anything is wrong.

Once GA4 is up and running, you can start exploring key reports such as traffic sources, page views, and user engagement. Don’t feel you need to understand everything at once. GA4 is powerful, but it’s best approached gradually, focusing first on the data that actually helps you make decisions about your website.

nadin 2026

Hi, I’m Nadin Thomson. I run Business Image Services Ltd, a web desgin & Local SEO agency in Dunfermline, Fife.

We design and support high-converting B2B websites for trades and service-based businesses across the UK.

Our work combines clear, customer-focused design, strong SEO foundations, and ongoing improvements that win trust and help turn visitors into enquiries.

I’ve been building websites since 1999, and for 20+ years I’ve helped organisations of all sizes improve their online presence with clear, strategic sites that generate leads.

I work in both English and German, which is helpful for clients who serve mixed-language audiences or want their messaging to feel natural in both languages.

I hold a university business degree and a postgraduate diploma in digital marketing.

Find out more about Business Image

Explore more

GEO, AEO, SEO and AI search: what does it all mean?
Understanding subdomains What they are and when to use one
How to tell customers you’re on holiday without compromising Home security
Who owns your Google Analytics account: you or your web agency?
How to market your new business A practical guide to getting started
What is an llms.txt file, and does your website need one
Website traffic vs conversions Why I’m delighted my client only gets 37 visitors a month
How to use ChatGPT for your business
Things you can use ChatGPT for in your daily life
How to brief your photographer and get the right website photos