Google Analytics answers the questions every website owner asks — who visits, where from, what they look at, what converts. For a UK WordPress site on smartxhosting.uk, GA4 is the free foundation that turns guesswork into decisions. This guide covers what GA4 is, how to create a property, four ways to connect it to WordPress (SEO plugin, Site Kit, MonsterInsights, manual code), how to verify tracking works, the reports UK small businesses should actually look at, and the UK GDPR / PECR cookie-consent requirements that apply whenever you use Google Analytics.
Why you need Google Analytics · What GA4 is · Creating a GA4 account and property · Method 1 — via Rank Math · Method 2 — via Site Kit by Google · Method 3 — via MonsterInsights · Method 4 — manual code installation · Verifying tracking works · Key GA4 reports for UK small businesses · UK GDPR and cookie consent · GDPR-friendlier alternatives · Frequently asked questions
Every UK business website benefits from knowing:
Without analytics, website decisions come down to guesswork. With analytics, you know which pages deserve more investment, which traffic sources are worth pursuing, and which parts of the funnel leak visitors.
Google Analytics 4 is the current (and only) version of Google Analytics. It replaced Universal Analytics in July 2023 and works on a different model: everything is an event. Page views, button clicks, file downloads, scroll depth, video plays — each is recorded as a named event with properties.
GA4 advantages over the old Universal Analytics:
Free for sites up to 10 million events per month — comfortably covers every UK small business.
analytics.google.com, sign in with your Google account (or create one).G-XXXXXXXXXX. You need this for every WordPress integration method.Keep the GA4 tab open — you will return to verify tracking once WordPress is connected.
If you already use Rank Math for SEO, the easiest path.
Rank Math inserts the tracking code on every page automatically.
Yoast SEO note: Yoast does not include a built-in Analytics connection. Pair Yoast with Site Kit (Method 2) instead.
Google's own official WordPress plugin. Brings Analytics, Search Console, PageSpeed Insights and AdSense data into the WordPress dashboard.
Site Kit connects five Google services — Analytics, Search Console, PageSpeed Insights, AdSense, Tag Manager. Useful if you want one place for multiple Google integrations.
One of the most popular dedicated Analytics plugins. Focuses on making data easy to understand.
Free version covers audience, behaviour, traffic sources. Pro adds e-commerce, form and real-time reports.
If you prefer not to install a dedicated plugin, add the GA4 tracking code directly.
Lightweight plugin for inserting code snippets.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>Replace G-XXXXXXXXXX with your Measurement ID. Save. Clear cache.
More advanced. Install GTM once, then manage GA4 and other tags (Facebook Pixel, LinkedIn Insight, conversion pixels) from GTM without touching WordPress code.
Add via a child theme's functions.php using the wp_head action. Not recommended unless you are comfortable with PHP — the plugin options are cleaner.
Open your website in a private/incognito browser window (so your own visit is not filtered). Simultaneously open GA4 and navigate to Reports > Realtime. Within 30 seconds, your visit should appear.
Install the Google Tag Assistant browser extension. Visit your site. The extension shows active tags, including GA4, and highlights any issues.
F12, Network tab. Visit your site. Filter for "collect" — you should see requests to www.google-analytics.com/g/collect on every page view.
Who is on the site right now. Reassuring for launch day; useful for troubleshooting campaigns.
Where visitors come from: Organic Search (SEO), Direct (typed URL or bookmark), Referral (other sites), Organic Social, Paid Search, Email. Tells you which channels deliver.
Most-viewed pages. Reveals your best content and where effort is returning.
Every tracked event. Filter to custom events like form submissions to see conversions.
Geographic distribution. Useful for UK businesses to confirm traffic is actually UK-based, and to see which regions drive visits.
Device, browser, OS breakdown. Drives decisions about mobile optimisation and browser testing.
Mark specific events as conversions (form submission, purchase). Track conversion rate over time and by source.
Google Analytics uses cookies to track visitors. Under UK GDPR and the Privacy and Electronic Communications Regulations (PECR), non-essential cookies require user consent before being set.
Analytics cookies are non-essential. You need a cookie consent mechanism.
Configure the chosen plugin to block Google Analytics until the visitor accepts cookies. Plugins like Complianz do this automatically via "consent mode" integrations with GA4.
GA4 supports Consent Mode v2 — when visitors decline cookies, GA4 still receives anonymised data (without cookies) so you retain some aggregate insight without compromising consent. Rank Math, Site Kit and Complianz all support Consent Mode v2 integration.
If the UK GDPR complexity of GA4 is more than you want to handle, alternatives:
Self-hosted inside WordPress. Data stays on your server. No US data transfer. Can run without cookies (cookieless mode) making consent banners unnecessary for analytics. Free.
EU-hosted, cookieless, fully GDPR-compliant without consent banner for analytics purposes. Clean, simple dashboards. Paid from EUR 9/month.
Similar positioning to Plausible. Privacy-focused, no cookies, GDPR-compliant. Paid.
Any of these removes the cookie-consent friction for analytics. Google Analytics remains the default because it integrates with Google Ads, Search Console, and has the deepest feature set — but for many UK small businesses the simpler alternatives suffice.
Is Google Analytics really free?
Yes, for the vast majority of sites. GA4 is free up to 10 million events per month. Only very large enterprise sites exceed this, and they pay for GA360 (enterprise tier).
Do I need both GA4 and Search Console?
They complement each other. GA4 tracks on-site behaviour; Search Console tracks how Google sees and delivers your site in search results. Connect both (Site Kit makes this easy).
Why is my GA4 traffic lower than my old Universal Analytics numbers?
GA4 counts differently — slightly fewer page views because it filters more aggressively. Also, UK cookie consent causes some visitors to be tracked anonymously or not at all. The trends over time matter more than absolute numbers.
How long does GA4 retain data?
Default is 2 months for user-level data, 14 months for event data. Configurable in admin settings. For historical comparison, set to the maximum 14 months.
Can I exclude my own visits from GA4?
Yes. Several ways: exclude your IP in GA4 admin; install the official Google Analytics Opt-out browser extension; or use a separate browser for site administration. Excluding excludes your own noise from real user data.
Does Google Analytics slow down my site?
Slightly. GA4's gtag.js is ~35 KB loaded asynchronously. Impact is small; measurable only in rigorous performance testing. Not a reason to skip analytics.
Why do my tracking codes sometimes disappear?
Caching plugins sometimes cache pages before the tag loads. Ensure your caching plugin respects dynamic head content. If using LiteSpeed Cache, Site Kit or MonsterInsights work correctly with it out of the box.
Should I use Google Tag Manager instead?
For sites that need multiple tracking pixels (Facebook, LinkedIn, conversion tracking, A/B testing), yes — GTM is worth learning. For sites that only need GA4, direct installation is simpler.
Can I see UK cities in GA4?
Yes. Reports > User Attributes > Demographic Details. City-level traffic for UK visitors. Useful for local businesses.
Is Google Analytics enough on its own?
For understanding traffic, yes. For conversion optimisation (session recordings, heatmaps), pair with Hotjar or Microsoft Clarity. Microsoft Clarity is free and complementary to GA4.
Launch your WordPress site on smartxhosting.uk
UK hosting with the Plesk WordPress Toolkit, LiteSpeed Cache, Redis object caching, free Let’s Encrypt SSL, free CDN and daily backups — from £2/month.
View WordPress hosting plans →