πŸ”΅
WordPress

Connecting WordPress to Google Analytics

πŸ“… 8 October 2026 ✏️ 8 October 2026 ⏱ 4 min leestijd

Learn step by step how to connect Google Analytics (GA4) to WordPress and which plugin best suits your site.

Connecting Google Analytics to WordPress gives you insight into visitor numbers, popular pages, and where your traffic comes from. First, you create a GA4 account, retrieve a Measurement ID there, and then connect it to your WordPress site via a plugin. Within minutes, you’ll start collecting data that helps you improve content, SEO, and user experience.

Creating a Google Analytics account

Go to analytics.google.com and sign in with a Google account. Click on ‘Create account’ and follow the wizard: fill in your account name, business details, and website URL. Google automatically creates a GA4 property, the current default version of Analytics. After creation, you’ll receive a Measurement ID, recognizable by the format G-XXXXXXX. Save this ID, as you’ll need it in the next step.

πŸ’‘ Tip: When creating your account, immediately choose a web stream and enter your full domain name, including https://, so Google links the correct data to your property.

Setting up the connection in WordPress

There are two ways to connect Analytics to WordPress: via a plugin or manually with code. For most websites, a plugin is the fastest and safest option, as you don’t need to edit any code and updates happen automatically. Popular choices are Google Site Kit, the official plugin from Google, and MonsterInsights, which shows extensive reports in your WordPress dashboard.

WordPressPluginAnalytics
1

Install the plugin

Go to your WordPress dashboard, click on Plugins β†’ Add New and search for Google Site Kit or MonsterInsights. Install and activate the plugin.

2

Connect your Google account

Start the plugin’s setup wizard and sign in with the same Google account you used to create the Analytics property.

3

Select a property

Choose the correct GA4 property from the list and confirm the connection. The plugin automatically places the tracking code on every page.

4

Check your settings

Verify that the Measurement ID is correct and save the settings. Your site will now send visitor data to Google Analytics.

If you’d rather add the code manually, place it in the -section of your theme via a custom code plugin, so it doesn’t disappear after a theme update.

Verifying and using Analytics

After setup, it usually takes about a day before Google Analytics shows full reports. In the real-time view, you can immediately see if visitors are being tracked: open your site in another browser and check whether you appear as an active user. After that, regularly review which pages get the most visits, where visitors come from, and how long they stay. These insights help you improve content and make informed decisions in your marketing strategy.

The speed of your website affects how visitors experience your site, and therefore also your Analytics numbers. On fast web hosting with NVMe storage, pages load quickly, which helps lower bounce rates.

Solving common issues

Not seeing any data come in? First check whether the plugin is actually connected to the correct property in your Google account. A common mistake is linking the wrong or an empty property. Also check whether you’re using a cookie banner plugin that blocks the tracking code until visitors give consent; this is normal behavior under privacy regulations, but it can significantly limit the amount of data collected.

If you run into a technical issue when adding code or managing your site, you can find more explanations in Tandata’s knowledge base, or you can contact support directly.

Frequently Asked Questions

How long does it take before Analytics shows data?

You can see real-time visitors immediately, but full reports with trends and pages are usually available after about a day.

Which plugin is the best?

Google Site Kit is Google’s official plugin and easy to use. MonsterInsights offers more extensive reports directly within WordPress. Both work well.

Is Google Analytics free?

Google Analytics 4 is free to use. There is a paid enterprise version, but for most websites, the free version is sufficient.

Does Analytics also work with a cookie banner?

Yes, but the tracking code will only activate after a visitor gives consent. This can reduce your visitor data, but it is legally required.

Can I disable Analytics again?

Yes, you can turn off the connection via the plugin or delete the property in Google Analytics. Historical data will remain saved in your account.

Conclusion

Connecting Google Analytics to WordPress can be done in just a few steps: create a GA4 account, install a plugin like Google Site Kit, and connect your property. Once the connection is active, you’ll gain valuable insights into visitor behavior that help you make better decisions for content and marketing. Fast, reliable hosting contributes to accurate measurement data and a pleasant user experience.

View web hosting β†’

Was dit artikel nuttig?