How to Add Google Analytics to a WordPress Website and Track Visitor Behavior

Often, analyzing organic website traffic can be an effective way to understand the behavior of your online visitors. Although WordPress.com offers various insights into page views, search keywords, and visitor location, you might want a more in-depth analytics tool.

With Google Analytics, you can view stats about visitor acquisition and engagement. You can go beyond the built-in stats tracking in WordPress and get more detailed information about user demographics and retention.

In this post, we’ll explain why you might want to consider using Google Analytics. Then, we’ll show you how to add it to your WordPress website in just four simple steps. Let’s get started!

Why You Might Consider Using Google Analytics

After you create a WordPress website, you can immediately access the Stats and Insights page. This will give you an overview of your web analytics, including page views, likes, and comments. You can also see what country your visitors are from and the search terms they used to access your content:

This basic information can be very useful if you’re just starting out as a website owner. It can provide a quick overview of your online visitors without overwhelming you. However, you’ll likely need more advanced data if you want to grow your website.

That’s when Google Analytics can come in handy. This popular web analytics software can track and report your website traffic. For instance, as you acquire new visitors, you can see exactly where they came from and how they found your website.

Using Google Analytics’ engagement reports, you can analyze how users interact with your content. This can include average engagement time per user as well as number of conversions:

If you run an online business, you can also use Google Analytics to track your revenue. You can even find out what your most popular products are and how many customers are first-time visitors:

Plus, if you need more specific information, you can create a custom report. This involves simply filling out specific metrics and how they should be displayed. By doing this, you can personalize and simplify your data so that it’s easier to analyze.

Furthermore, Google Analytics can help you solve specific problems on your website. For example, it can allow you to identify if you have a significant bounce rate. Then, you can implement solutions to keep visitors on your website. 

If you want to boost page views, you can use it to improve Search Engine Optimization (SEO) and launch advertising. Ultimately, information from Google Analytics can help you better understand user behavior and enhance your effectiveness.

How to Add Google Analytics to Your WordPress Website (In 4 Steps)

Once you decide to start using Google Analytics, you can easily integrate it into your WordPress website. Before you get started, you’ll need to upgrade to a WordPress.com Pro plan. This enables you to use Google Analytics for free. 

Step 1: Create a Google Analytics Account

If you don’t already have a Google Analytics account, you’ll need to sign up for one. To do this, go to the Google Analytics website and click on Start measuring:

This will allow you to start creating a new account. First you’ll need to fill in your account name. Then, you’ll see some details about data sharing:

Although all four data sharing options will automatically be selected, you can opt out by deselecting them. This will customize how much of your data is shared with Google. When you’re finished making your selections, click on Next.

Now, you’ll need to set up a property. For the Property name, simply enter your site title. Then, select the correct time zone:

At the bottom of this page, make sure to enter the currency you use. After this, select Next.

To finish creating your account, the last step is to fill out your business information. First, select your industry category and business size:

Then, answer how you intend to use Google Analytics. When you’re done customizing this information, go ahead and select Create

Alternatively, you can sign in to your pre-existing Google Analytics account. Then, go to Admin > Create Account. You can proceed with the same steps for linking your WordPress site.  

Step 2: Set Up a Data Stream

Before you can start using Google Analytics, you’ll need to accept the terms and conditions. In the automatic pop-up window, make sure to check the boxes and then click on I Accept:

Now, in order for Google Analytics to start collecting data, you’ll need to set up a data stream. Essentially, this allows your website’s data to be transferred to Google Analytics.

Once you accept the terms of service, you’ll be able to access your Google Analytics dashboard. Here, it should automatically direct you to the Data Streams page:

Under Choose a platform, click on Web. To set up your web stream, you’ll need to enter your website’s URL and site title:

By default, the Enhanced measurement option will be enabled. This enables Google Analytics to track page views, scrolls, outbound clicks, and more.

After filling out your website information, select Create stream. Then, you’ll be able to see the details of your new web stream:

On this page, find the Measurement ID, located in the top right hand corner of your screen. Then, copy this string of letters and numbers to your clipboard. 

Step 3: Enable Google Analytics in WordPress

Once you copy your measurement ID, go to your WordPress dashboard. Then, navigate to Tools > Marketing:

This will take you to the Marketing and Integrations page. Here, click on the Traffic tab:

Then, scroll down to the Google section, where you’ll see an option for Google Analytics:

Keep in mind that if you haven’t already, you’ll need to upgrade to a WordPress.com Pro plan. This includes a way to integrate Google Analytics without installing a new plugin. Plus, you’ll be able to access premium themes, a free domain name, and advanced SEO tools

Once you purchase this plan, you can start connecting your Google Analytics account. To do this, paste the measurement ID that you copied earlier into the appropriate field:

Lastly, click on Save settings. This will automatically link your WordPress and Google Analytics accounts and start sending your data to Google. That’s it!

Step 4: Enable E-Commerce Analytics (Optional)

If you run an online store, you can also customize Google Analytics for e-commerce. This can give you more insight into how many users view your products, add items to their carts, and complete transactions.

Although this step is optional, it will allow you to analyze your customers’ shopping and purchasing behavior, so we highly recommend it for e-commerce sites. This way, rather than viewing general information about your online visitors, you can use in-depth consumer analytics to improve your online business. 

First, go to your Google Analytics account and turn on Enhanced E-commerce. Then, go back to the Traffic page of your WordPress dashboard. In the Google Analytics section, find Enhanced store analytics:

Select Enable Enhanced eCommerce. Below this, you can continue to customize the information that you want to track, including product detail views, clicks, and impressions. Once you’re finished, save your changes. 

Now You’re Ready to Use Google Analytics

When you use Google Analytics, you can access detailed information about your visitors’ demographics and behavior. After you learn about your audience, you can then improve your SEO and advertising to boost views and engagement. Therefore, this can be an effective, affordable tool for growing your WordPress business.

To recap, here are the four steps you can take to add Google Analytics to your WordPress website:

  1. Create a Google Analytics account.
  2. Set up a data stream.
  3. Enable Google Analytics in WordPress.
  4. Enable e-commerce analytics (optional).

Do you have any questions about connecting Google Analytics and WordPress? Join our forum or visit our support resources.

ABOUT THE AUTHOR

The WordPress.com Team

At WordPress.com, our mission is to democratize publishing one website at a time. Create a free website or build a blog with ease on WordPress.com. Dozens of free, customizable, mobile-ready designs and themes.

More by The WordPress.com Team

%d bloggers like this: