How to Add Google Analytics to WordPress

Written by Coursera Staff • Updated on

Learn how to add Google Analytics to WordPress to gain access to insights about how customers are interacting on your website.

[Featured Image] Two marketers stand in their office and look at a tablet screen as they add Google Analytics to WordPress.

WordPress is an open-source software for creating websites, blogs, and e-commerce platforms. It offers a suite of services in its Premium, Business, and Commerce subscription plans, including the ability to connect Google Analytics for website tracking and data collection to understand how your customers are interacting with your website or blog. 

In this tutorial, you will learn how to add Google Analytics to WordPress to begin collecting user data. 

How to add Google Analytics to WordPress

1. Create a Google Analytics account.

If you have not already signed up with Google Analytics, you need to do that first. Once you've signed up or signed in, you'll need to create an account for your website or blog. If you already have a Google Analytics account, you can skip to step two. To create a Google Analytics account, sign in to Google Analytics and go to the Admin tab, which you can find by clicking the gear icon at the bottom left of the page. 

TT2023039 add google analytics to wordpress step 1a
TT2023039 add google analytics to wordpress step 1b

2. Create a property and add company information. 

In your Google Analytics account, click on the Create icon and select Property

TT2023039 add google analytics to wordpress step 2

You will add company information here, such as the timezone, currency, name, size, and how you plan to use Google Analytics. Read and accept the terms that appear in the pop-up. 

3. Create a stream. 

Next, you will see a screen prompting you to select what type of data stream you’ll collect data for. To add Google Analytics to WordPress, select a Web data stream. 

TT2023039 add google analytics to wordpress step 3a

Enter your stream name. Next, decide whether you will use Enhanced measurement, which collects additional data. If you change your mind later, you will be able to edit your preferences, but you will only be able to collect enhanced measurement data for the time periods when you opt in. 

TT2023039 add google analytics to wordpress step 3b

4. Get a measurement ID with Site Kit.

Next, you will see a screen with three choices: Install manually, Install with a website builder or CMS, or Use a Google tag you already have. Choose Install with a website builder or CMS, and click Next

TT2023039 add google analytics to wordpress step 4a

Click Select your platfom and choose Site Kit plugin.

TT2023039 add google analytics to wordpress step 4b

This will provide you with a Tag ID. Copy this number to your clipboard. 

TT2023039 add google analytics to wordpress step 4c

5. Go to WordPress. 

Your next task will be to install Google Analytics into WordPress. In your WordPress account, go to Tools > Marketing > Traffic. Find the box labeled Google Analytics Measurement ID and paste your Tag ID here. Click Save Settings. You are now collecting WordPress data with Google Analytics. 

Common issues

If you just added Google Analytics to WordPress, you may be curious to know whether or not it’s working. If you compare the data you collect in Google Analytics to the data that WordPress collects with in-house analytics, you may notice some discrepancies. This is normal and doesn’t indicate a problem. Jetpack and Google Analytics use different methods to collect and calculate data, which leads to differences in the results you see. 

Most Google Analytics data does not report in real-time, so you may notice a time lag between when activity happens on your website and when you see it reported on Google Analytics. 

Learn more about Google Analytics

If you’re ready to take the next step and learn more about a career as a marketing coordinator, e-commerce associate, or similar position, consider earning your Google Digital Marketing & E-commerce Professional Certificate on Coursera. This beginner-level, seven-course series is designed to help you learn skills in search engine optimization, display advertising, email marketing, and more.

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.