WP Buffs Blog |

How to Add Google Analytics to WordPress: 2 Methods Plus GA Plugins

If you want to grow your website to its full potential, you’ll need to pay attention to the numbers. In practice, that means monitoring everything from how many visitors you’re getting to where they’re coming from (and much more).

how to add google analytics to wordpress

All of that information falls under the banner of ‘analytics’. WordPress doesn’t include an analytics solution out of the box, which means you’ll need to use a service such as Google Analytics (which happens to be both free and fantastic).

We love free and powerful solutions, so in this article, we’ll show you how to add Google Analytics to WordPress using two approaches. Then we’ll introduce you to five Google Analytics plugins that can make monitoring your numbers much easier. Let’s get to it!

Video Tutorial 🎥

Our team at WP Buffs helps website ownersagency partners, and freelancer partners set up and monitor Google Analytics, 24/7. Whether you need us to manage 1 website or support 1,000 client sites, we’ve got your back!

The Benefits of Adding Google Analytics to WordPress (And Using a Dashboard Solution) 🙌

A WordPress website is not a set-it-and-forget-it kind of thing. In order to maximize this tool within your marketing arsenal, you have to keep an eye on what visitors are doing on your site. Then you can begin to formulate a plan for how to make them respond even more positively.

Google Analytics enables you to do just that. This tool can provide you with access to a staggering amount of data, including specifics such as:

  • Number of pageviews
  • Average session duration
  • Bounce rate
  • Geographic origin
  • Device type
  • Traffic source
  • Behavior flow
  • E-commerce data points
  • Custom-created goals

All of that information is invaluable, but in some cases it can be overwhelming. In fact, if you’re using Google Analytics for the first time, it can be hard to find the data you’re interested in. To give you an idea of what you’re in for, here’s a quick look at a Google Analytics dashboard:

google analytics wordpress

That’s just a single tab, and it may already seem hard to navigate. Google Analytics’ User Interface (UI) is great, but there’s a lot of information on every page. That’s why a WordPress Google Analytics dashboard can make your life a lot easier.

By a “Google Analytics WordPress dashboard”, we mean a section of your admin area where you can monitor data without leaving your website:

wordpress google analytics

Along with helping you monitor key numbers, a WordPress Google Analytics dashboard can benefit you in a multitude of ways. Some of the key benefits include:

  • It’s easy to implement. Thanks to WordPress Google Analytics plugins, connecting this platform with our favorite Content Management System (CMS) can be a breeze.
  • You can be more productive by integrating your analytics into the WordPress dashboard, keeping all of your most vital information in one place.
  • Google Analytics plugins are easy to customize and use. You can set them to display the data that matters most, and within the time frames that are most relevant.
  • WordPress analytics dashboards are great for clients, as they take the intimidation factor out of Google Analytics.
  • By putting analytics within the dashboard, you’ll encourage your clients to log into WordPress regularly, since they’ll know they can get a high-level overview of their statistics right there.
  • Real-time insights and long-term analytics are available within the same dashboard panel, making it easier to make smart and timely decisions for the site based on data (rather than on gut instinct).
  • You’ll be able to tell if your site is receiving unusual traffic, which could indicate potential security issues.

There’s no reason not to track your website’s numbers, and every reason to do so. All you need is the right solution.

Fortunately, Google Analytics is the most powerful free solution on the market. In the next section, we’ll go over how to install Google Analytics manually and by using plugins, so you can start tracking analytics right away.

Before we move on, though, we should mention that you don’t have to go it alone. Adding Google Analytics to WordPress can be a little tricky, but we can help! We include Google Analytics setup as a part of our services, and can help you with the processes below.

 

How to Add Google Analytics to WordPress (2 Methods) 👀

As usual, WordPress provides you with more than one approach to accomplish a specific goal. When learning how to install Google Analytics on WordPress, there are two routes you can take:

Both approaches have their pros and cons, which we’ll explore within their respective sections. Let’s start by going over how to set up Google Analytics on WordPress manually.

1. Add Google Analytics to WordPress Manually

Signing up for a Google Analytics account is simple. All you need in order to use the free service is a Google account and a website. For the purposes of this walkthrough, we’re going to assume that you already have both.

During the signup process, Google will ask for some basic information about your website, including its URL and what it’s about:

Once you make your way past the signup stage, you’ll gain access to your Google Analytics dashboard. Keep in mind that at this point, your site isn’t connected to the service yet. Now Google will ask you what type of property you want to connect:

If you select the Web stream option, Google will ask you once more for your website URL and enable you to select what interactions will be tracked:

how to set up google analytics on wordpress

After you click on Create Stream, Google Analytics shows you a section called Tagging Instructions. You need to add what is called a ‘tag’ or a code snippet to your website, in order to connect it to the platform:

If you select the Global site tag option, a custom code snippet will appear. Copy and save that snippet, or keep this tab open because you need to add that code to WordPress.

That begs the question – where to add Google Analytics code in WordPress? The Google Analytics global site tag code should go within your website’s header. There are two ways you can add that code manually, which are:

  1. Use the Customizer to modify your site’s header.
  2. Edit your theme’s code (or a child theme’s, preferably) manually via File Transfer Protocol (FTP).

Both approaches are relatively simple, but they require you to be comfortable editing code manually. However, when it comes to adding code to the WordPress header or footer, we almost always recommend that you use a plugin.

2. Use a Google Analytics Plugin

Google Analytics plugins are tools that enable you to connect the platform with your website without needing to dig into its code.

In the past, a lot of Google Analytics plugins required you to enter a unique ID from the third-party site. These days, most plugins simply ask you to grant authorization for them to pull data directly from your Analytics account.

That process works much the same regardless of what plugin you’re using. For example, if you use Site Kit by Google, it will ask you to sign into your Google account and confirm site ownership:

This particular plugin automatically sets up a Search Console account for your website. Once that’s done, you can connect other Google services with a few clicks, including Analytics:

how to use google analytics on wordpress

If you select that option, Site Kit will ask you to confirm which Google Analytics account you want to use. Then it will ask for permission to access your analytics data:

Once you allow the plugin all the permissions it needs to function, it will start pulling data from Google Analytics. However, keep in mind that if you just started using the service, it may take a while until it starts showing you concrete numbers:

wordpress google analytics plugins

As you can see, using a Google Analytics plugin can be much simpler than adding the platform’s tracking code manually. However, we’ve just shown you one plugin so far. In the next section, we’ll expand that selection.

 

5 Top Google Analytics WordPress Plugins to Create a Data-Rich Dashboard 👩‍💻

Now that you know how to use Google Analytics on WordPress, let’s talk about the tools you can leverage. There are a lot of WordPress Google Analytics plugins to choose from. For this roundup, we’ll focus on tools that enable you to connect the platform to your website and display some of its metrics within your dashboard.

As we mentioned earlier, most Google Analytics plugins let you connect the analytics tool with your website without you needing to input any data. However, some extensions may still ask you for your Google Analytics ID. If that happens, you can refer to this guide on how to find that ID.

Below, we’ll take a look at five of the best Google Analytics WordPress plugins to consider:

1. Google Analytics for WordPress by MonsterInsights

MonsterInsights plugin

Among the most-highly trusted WordPress plugins for Google Analytics is the one available from MonsterInsights. Since this is a freemium plugin, you can expect that there will be more data available as you pay to play. However, the free version of this plugin is also quite powerful.

Here are some of the highlights:

  • The interface of the plugin is beautiful, and features some subtle animations to keep your clients engaged with their data.
  • Rather than just focusing on numbers, the MonsterInsights plugin shows data that’s especially helpful for clients that produce a lot of content. Specifically, they’ll be able to see the number of pageviews, the top URLs, and a list of referral websites.
  • The premium version of the plugin provides additional insights. Among other things, you can see what’s going on with your AMP content, AdSense ads, e-commerce products, and Facebook Instant Articles.

With this MonsterInsights plugin, you’ll be able to access a dedicated Google Analytics dashboard from within the WordPress admin area:

MonsterInsights Dashboard

However, some parts of that dashboard aren’t available if you’re using the free version of the plugin. This is one of the many reasons we recommend investing in a premium license. 

2. Google Analytics WD

Google Analytics WD

The Google Analytics plugin from 10Web is definitely one of the best Google Analytics WordPress plugins around. If you want access to comprehensive analytics and more control over how the data is displayed from within WordPress, this is a solid tool to consider using.

Here is what you need to know about this plugin:

  • The premium plugin provides access to reports from within WordPress, as well as more customization of those reports (especially for e-commerce goal tracking).
  • You can see a high-level overview of your analytics from the main WordPress dashboard widgets, or you can use the new Analytics tab to drill down deeper.
  • Analytics can be displayed using one or two variables, depending on what you’re trying to track.
  • You can also experiment with the type of data visualization through the use of line charts, standard column charts, or even pie charts.

Here is how the data is displayed from within the main WordPress dashboard widget:

Using the WD Analytics plugin

And here is the expanded view and customization capabilities from within the Analytics tab:

An extended look at the Analytics WD plugin

If you need an analytics tool for your own websites, this plugin is a terrific choice. However, for clients, you can expect there to be a learning curve if they’re new to analytics tools. In that case, you may find that one of the simpler plugin solutions will be more suitable for them.

3. Site Kit by Google

We’ve already given you a taste of how this plugin from Google works. To sum it up, Site Kit from Google is an official plugin that provides you with a simple way to connect multiple Google services with your WordPress website.

Those services include:

If you’re the kind of person who likes using Google services, this plugin can be a one-stop solution for integrating almost all of the options that you might need. Moreover, each platform that you integrate gets its own dashboard where you can monitor its data:

Monitoring analytics using Site Kit

Connecting most services using this plugin is as easy as selecting which Google account to use and granting it the corresponding permissions. However, if you don’t want to integrate any other Google services beyond Analytics, there’s little reason for you to use this swiss-army knife of a plugin.

4. Google Analytics Dashboard by Analytify

The Google Analytics Dashboard plugin by Analytify does precisely what its name implies. With this plugin, you can add Google Analytics to WordPress with a few clicks, and get access to a dashboard within your admin panel.

Here are some of the many features that the plugin offers, as well as some of the data sets it can show you:

  • Enhanced e-commerce tracking with support for WooCommerce
  • Built-in traffic numbers for all your WordPress posts and pages
  • Top countries and cities by visitors
  • Page bounce rates
  • Statistics by device type
  • Which websites are sending you the most visitors

All of that data is available both in the form of graphs and simple numerical breakdowns:

If you value a user-friendly analytics dashboard, this plugin is one of our top recommendations. Its free version also offers a wealth of information, and it’s a great option for both personal and client websites.

Keep in mind that there’s also a premium version which provides you with access to much more data within the dashboard. That includes real-time numbers, analytics campaigns, goals, and much more.

5. Beehive Analytics

The Beehive Analytics plugin

Beehive Analytics is part of the WPMU DEV family of plugins. It’s a free plugin that enables you to connect your Analytics account with WordPress, and display its data within your dashboard.

This Google Analytics tool includes options to protect your visitors’ privacy, such as IP anonymization. Beehive Analytics also enables you to decide which user roles have access to which data within the dashboard.

Using Beehive Analytics, you get access to the following information from a custom dashboard:

  • Number of sessions and users
  • Number of page views
  • Average time on page
  • Bounce rate statistics
  • Top countries and most visited pages
  • User trends
  • Referral websites and search engine reports

If you want a powerful Google Analytics dashboard that gives you insight into all the most important metrics you should be monitoring, Beehive Analytics is a solid choice:

Since we’re talking about a free plugin, there are no hidden premium features to speak of. Although Beehive Analytics is a robust solution, it’s also missing some more advanced functionality, such as e-commerce tracking and goals reporting. However, if you only want access to core metrics, we recommend giving this plugin a try.

Frequently Asked Questions (FAQs) 👓

Yes, Google Analytics works with WordPress. Once you learn how to use Google Analytics on WordPress, you can track the behavior of your website's visitors and gain insight into how to improve engagement and drive growth.

If you're wondering how to set up Google Analytics on WordPress, you have a couple of options to choose from. You can add Google Analytics to WordPress manually or using a plugin. There are plenty of plugin options, and that's the method that we recommend in most cases.

One of the best things about Google Analytics is that it's free, just like WordPress itself. You can connect these two solutions manually or using a dedicated plugin, and create a powerful no-cost solution for driving and measuring traffic.

By default, connecting Google Analytics to WordPress doesn't give you access to metrics within the CMS' dashboard. For that to happen, you'll need to use a Google Analytics WordPress plugin that includes this feature.

Which Google Analytics WordPress plugin to use depends on what metrics you want to monitor and which UI you prefer. Some top options include Beehive Analytics and Google Analytics for WordPress by MonsterInsights.

Improving your Google Analytics metrics requires Search Engine Optimization (SEO) work. If you're using WordPress, there are several plugins that you can use for SEO, including RankMath and Yoast SEO.

Free WordPress site speed eBook

Speed eBook to improve Core Web Vitals

Download our Free Speed eBook to get the 12-step checklist on achieving load times under 1 second!
FREE EBOOK

Wrapping Up 🏆

Using an analytics tool for your website is not negotiable. Without a service such as Google Analytics, you’re essentially flying blind. You may know how much traffic you’re getting, but you’ll miss out on a wealth of information about your visitors’ behavior, where they come from, and how well your SEO efforts are working

Learning how to add Google Analytics to WordPress is easier than you might imagine. You can do so manually or using a plugin. As is often the case, the latter is the better approach. As for what plugins to use, there are plenty of top options, including Google Analytics for WordPress by MonsterInsights and Site Kit by Google.

If you want help setting up Google Analytics for your website, we have your back. A WP Buffs, we can help you find the Google Analytics solution that works best for your needs and integrate it with your WordPress website. With our premium maintenance services, you’ll always have access to the critical metrics that you want to monitor.

Want to give your feedback or join the conversation? Add your comments 🐦 on Twitter!

Image credit: Unsplash.

If you enjoyed this article, then you’ll really enjoy the 24/7 WordPress website management and support services WP Buffs’ has to offer! Partner with the team that offers every aspect of premium WordPress support services.

From speed optimization services, to unlimited website edits, security, 24/7 support, or even white-label site management for agencies and freelancers, our expert engineers have your back. Bring us in as part of your team to make your site Bufftastic! Check out our plans

Talk to a WordPress expert 24/7

Travis Lima
Parys, South Africa


Joe Howard
Washington D.C, USA


Alec Wines
Nashville, TN, USA


✅ 24/7 WordPress care plans for serious website owners

✅ 24/7 white-label site management for agencies and freelancers

No thanks. I can manage, speed up, secure, fix and grow websites myself.

Which care plans best fit your websites (or client sites)?

✔️ White-label site management

✔️ $1,000+ of premium plugins free under our care plans
✔️ 24/7 website edits and priority support
✔️ Ongoing speed and security optimization
✔️ 24/7 website uptime monitoring
✔️ 4x daily cloud backups
✔️ Weekly plugin, theme and core file updates
✔️ Weekly reports detailing any on-site changes

No thanks. I can manage, speed up, secure, fix and grow websites myself.
Questionnaire

Honed and proven strategies we've used successfully 500+ times to help you sell your first care plans. Action steps you can implement in minutes.

No thanks, I can already sell as many care plans as I want.
How to Sell Your Very First Care Plans Cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Finally, an email list that helps make WordPress simple and effective for you.

Speed & security optimization tips and detailed how-to guides with advice you can implement today.

No thanks, I already know everything about WordPress.
Speed checklist eBook cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Case study eBook cover (Rigorous Digital)
Case study eBook cover (MEP Publishing)
How to Sell Your Very First Care Plans Cover

Finally, get your website 99.9999% secure and loading in under 1 second.

Our free eBooks and easy-to-follow checklists will have your website fully optimized in just a few hours.

No thanks, my website is as fast and secure as I want it.

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

How to Sell Your Very First Care Plans Cover

Finally, a WordPress newsletter you'll actually read every single month.

✔️ High-impact news

✔️ Actionable tutorials and videos

✔️ #WordPress Twitter highlights

✔️ Vote on receipient of $200 donation and WP Buffs merch giveaways

✔️ Fully curated so you only receive the best 5% of content

No thanks, I have other ways to stay updated with WP

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Read about how we increased Rigorous Digital's profit margin by 23% and helped remove all website issues for MEP Publishers and their 3 complex websites.

Case study eBook cover (MEP Publishing)
No thanks, I don't need more profit and I can tackle all my WordPress issues myself.
Case study eBook cover (Rigorous Digital)

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Register for our next live WP AMA event!

🏆Chance to win weekly giveaways

📆 Instant invites to our Weekly WP AMA

🙋 First access to submit questions

💻 Direct links to all of our events

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.