How to Install Google Analytics in WordPress

Google Analytics Wordpress

Do you want to quickly and easily install Google Analytics in WordPress? If you’re a blogger, you probably want to know how to make your blog rank better in search engine results. One way to do this is to install Google Analytics on your website.

Once Google Analytics is installed, it records all the data from your website and provides information about what users do when they visit your website. This information helps you understand how users are using your website so you can make changes to make it more effective and grow your audience over time.

Anyone with basic computer skills can easily install Google Analytics on their WordPress-powered website and generate reports with this tool in no time!

Why is Google Analytics Important for You and Your WordPress Website?

Google Analytics gives you “x-ray vision” to see what’s happening behind the scenes with your website.

You’ll learn things like:

  • How many visitors your attracting
  • Where those visitors are coming from
  • How long those visitors are staying
  • Where and why they are leaving
  • What your audience likes on your website
  • How to deliver a better user experience

And that’s just the tip of the iceberg!

With Google Analytics running “under the hood” of your website, you’re going to be able to optimize not just your traffic generation approach better but your content and conversion approach, too. Extremely valuable for your marketing as you can make data-driven decisions with one look in your Google Analytics Dashboard.

Without this kind of information, figuring out what’s working on your site – and what isn’t – is next to impossible.

You must get Google Analytics set up (and set up correctly) if you want to optimize your site and your online business going forward.

How to Install Google Analytics in WordPress – Step by step

Luckily, installing Google Analytics in WordPress is a pretty simple and straightforward process.

You’ll have a couple of different options to pick and choose from to get up and running, and I highlight the best (and easiest) setup steps below.

At the end of the day, you’ll never have to worry about fighting with Google Analytics or your WordPress installation to marry these two powerful pieces of online business tech.

Let’s jump right in, shall we?

1. Setup via the official site kit plugin

Install Google Analytics in WordPress with the SiteKit plugin

Google’s Site Kit plugin is much more than just an integration between Analytics and your WordPress installation.

You also get some great tools to help you gain deeper insights into your site and web traffic and figure out how to best optimize and monetize your platform. All of this is also integrated right into your WordPress backend.

The very first thing you’ll need to do (no matter how you go about installing Analytics on your site) is creating a Google Analytics (GA) account.

This account is 100% free of charge, available to anyone and everyone, and the sign-up process is drop-dead easy, too.

Navigate over to the Google Analytics website and click the SIGN-UP button. You’ll be asked to sign in to your Google account.

Next, you’ll be prompted to go through the GA account creation process.

Provide information about your account name, the type of analytics you are looking to run (web analytics), and information about the site that you are going to be tracking.

Once you’ve done all that – the whole process should take about five minutes – you can download the official Google Site Kit WordPress plugin and add it to your WordPress installation.

Install the site kit plugin
You can install the Site Kit plugin for WordPress directly from your admin area

Log into your WordPress dashboard, go to the Plugins section in your admin backend and add the official WordPress plugin.

From there, you’ll need to configure everything to work with the Google Analytics account you just created. But this process is also quite simple and should be done in a minute or two.

After that, you are off to the races!

2. Add Google Analytics Manually without a Plugin

Of course, you can always choose to add the Google Analytics capabilities you’ve just signed up for to your WordPress installation without having to fiddle with plugins.

You’ll just have to go through the process manually.

This requires you to start with a child theme, though. It’s critically important that you are using a child theme if you’re going to go with the manual setup of Analytics.

If you don’t use a child theme, every time you update your WordPress theme in the future you’ll inevitably end up wiping out the Google Analytics code – and that’s going to cause a whole bunch of problems for you moving forward.

Log in to the Google Analytics administrative dashboard and then navigate to the ANALYTICS TRACKING CODE section of your admin backend.

Copy the code provided to you exactly and then log into your WordPress administrative backend.

From there you’ll need to navigate to the APPEARANCE section and then the THEME EDITOR section. Click on the “parent theme” option and then open up the header.php file.

Insert the analytics tracking code in the header.php file
You have to insert the code before the final head tag (</head)

All you have to do from here is simply paste the code that you copied from Google Analytics directly above the </head> tag in this file.’

Click save or UPDATE FILE and you are good to go.

Now you have this set up manually!

3. Using the Insert Headers and Footers Plugin

Use the headers and footers plugin to insert the GA tracking code

If you don’t like to fiddle around in the PHP files of your WordPress installation, there is a pretty good alternative.

With the help of the “Insert Headers and Footers” plugin, you can insert any code into your header or footer. Easily done from the backend of your website. And of course without being a programmer.

4. Use Google Tag Manager to add your tracking codes

Google Tag Manager is another popular way to get set up with Google Analytics and your WordPress installation.

Just remember, though, that this kind of approach is better designed for WordPress sites that incorporate a lot of different scripts – not just those that are running analytics codes.

What you’ll want to do is get your hands on the free, official Google Tag Manager WordPress plugin. This plugin is 100% safe, 100% legit, and 100% good to go.

Grab that through the official WordPress dashboard under the PLUG-INS and ADD NEW menu. This guarantees that you get the most up-to-date version of the Google Tag Manager plugin, as well as the legitimate and official plugin and not some knockoff.

After installing the plugin through your dashboard you’ll want to open up the Google Tag Manager configuration. You’ll be prompted to create an account (something that only takes a minute or two), and then you’ll need to copy over your Container ID.

Your Container ID is always going to start with three letters – GTM.

Pop back over to your WordPress site, paste your GTM Container ID into the plugin setting field and then click the SAVE CHANGES option.

You’re rocking and rolling now!

Best Plugins to install Google Analytics in WordPress

There are other Google Analytics plugins for WordPress out there that make it really easy to use these analytics tools, complete with some unique features that the official plugin from WordPress does not provide.

Here are just a couple of options you’ll want to consider moving forward in order to improve your marketing strategies.

MonsterInsights – Best Google Analytics Plugin for WordPress

MonsterInsights Analytics Plugin

Universally beloved as the best Google Analytics plugin for WordPress installations, this particular plugin is even more popular than the free, official one directly from the folks at Google.

If you’re looking for just one plugin to manage your WordPress Google Analytics setup, make sure that it is this one!

MonsterInsights provides you with a lot of features that you get without having to touch your theme files to insert the code snippet.

The plugin helps you integrate the Universal Analytics code but also works with Google Analytics 4.

Included are some advanced features like tracking affiliate links and separately tracking outbound links.

What’s very nice is that you don’t actually have to go to your Google Analytics dashboard anymore. One feature is that all-important data is displayed directly in your WordPress administration area.

MonsterInsights comes from the creators of Wpforms. So it is a 100% trustworthy plugin with a great setup wizard and no negative impact on your website’s loading time.

ExactMetrics

Exact Metrics Plugin for WordPress

A premium suite of analytics tools that a lot of folks consider “Google Analytics Plus“, you have to pony up a little bit of extra money to use these detailed analytics – but many find them worth every penny.

The insights, the information, especially the reports available from this premium plugin are all top-tier.

GA Google Analytics

GA Google Analytics plugin

WordPress site owners who want to keep their platform as lean and fast as possible love this WordPress plugin. The GA Google Analytics plugin is so lightweight that it removes all the “extra baggage” that other options bring with them to keep your load times lightning fast.

Nevertheless, you will get important reports that will show you the performance of each post.

Also with this plugin, you don’t have to insert the analytics code yourself in every corner of your website, but only once via the extension.

10Web Google Analytics

10Web Google Analytics

10Web Google Analytics is perhaps the most powerful (and certainly the most customizable) of all Google Analytics WP plugins on the market, and certainly a fan favorite. It was designed from the ground up with serious marketers and online entrepreneurs in mind.

WP Google Analytics Events

WP Google Analytics Events

Another stripped-down and sleek WordPress plugin designed to use Google Analytics. WP Google Analytics Events is an option you should consider if you’re looking for a simple way to make events, actions on your website, visible in Google Analytics.

WP Statistics

WP Statistics uses Google Analytics as a foundation to dig up the kind of data you need to make smarter decisions as a website owner, business person, and entrepreneur. The insights, the optimization tips, and the resources provided from this plugin go much further than what Google Analytics provides on its own, though.

The bottom line

Google Analytics is a popular and versatile tool for monitoring website traffic. If you use WordPress as your blogging platform, my guide makes it easy to install the plugin on new and existing websites!

This article should be enough to get beginners started quickly. Have you ever used Google Analytics for your digital marketing? What advice would you give to someone looking to incorporate Analytics into their business plan?

I’d love to hear from you in the comments below or feel free to email me.

Leave a Comment