Install Google Analytics To Your WordPress Site In 3 Easy Steps
In this post, I’m going to share how to install Google Analytics on your WordPress site in 3 easy steps and why traffic stats are crucial for your blogging success. After reading this post, you should be able to implement the tips and have Google Analytics installed on your website.
Whether you’re a website owner or a blogger, you’re probably wondering how your reader finds your site, which pages have the most engagement or what kind of posts they like to read. Google Analytics is a FREE tool that can provide such information. When I first started my blog, I didn’t know there’s an easy way to install Google Analytics on WordPress. As a new blogger, I almost broke my site trying to do it the hard way. I hope this post helps you install Google Analytics on your WordPress site in a bliss.
Full disclosure: This is a sponsored post from MonsterInsights. I was compensated for writing this post. However, all reviews and opinions expressed in this post are based on my own personal view.Â
Why install Google Analytics on your WordPress blog
1. Understand your audience better
As soon as you’ve published your first post, you’ll wonder if your post gets read and how long readers stay on it. Google Analytics helps you see the data-driven decision by gathering the stats that matter to your website. It can track user data such as geographical location, language, browser, devices, just to name a few.
This data is so helpful when it comes to monetizing your blog or website marketing strategies. You can use these stats to learn what kind of blog post they read most, what pages they spend the most time on or what devices they use to come to your site. This information gives you a better idea as to how to optimize your site and your content.
2. Get to see real-time data
The real-time feature allows you to see how visitors interact with your website in real-time. You can see how many visitors are currently on your website and other helpful information such as their location and what page they are on. I think it’s really neat to see such information in real-time.
3. Make informed decisions
After tracking your traffic and gathering user behavioral data for a period of time, it’s important to utilize that information to improve your site. For example, you should emphasize more on particular kind of posts that get the most engagement. By looking at the Behavior section, it tells you how many audiences read each post. Perhaps, you may want to write more on those particular topics.
On the other hand, you can find what kind of posts that are not so popular. This way you can write more of the content your audiences are looking for.
Google analytics also shows you how your audience finds your site. If most of your audience comes to your site through referral links such as Facebook, perhaps you might want to work on your SEO (Search Engine Optimization) more so that you can also get more traffic from search engines.
If you don’t have much referral source that comes from other websites, you should consider reaching out to other websites for guest posts or sponsored posts. It’s also great for boosting up your Domain name Authority.
As you can see, Google Analytics is an important tool for your website’s success. Let’s move on to how you can install it to your WordPress website.
How to install Google Analytics on WordPress website
The first step you’ll need to get started is to sign up for a Google Analytics account. If you already have a Google account for email or for other Google services then you can use that credential to create your Google Analytics account. If you don’t have a Google account, then you will need to sign up for one. The sign-up process is very simple. Head to STEP 1 below to create your Google Analytics account. Otherwise, you can skip the Google sign up and jump to create your Google Analytics account using your Google login credentials.
STEP 1: SIGN UP FOR A GOOGLE ANALYTICS ACCOUNT
If you don’t have a Google account, head to Google Analytics homepage first and click “Start for free” button.
And then put your email in the “Email or phone” box. Then click “Create account”. Keep in mind that the email you are going to enter will be your new Gmail account.
If you already have a Google account or you just created one, head to the Google Analytics login page and enter your login credentials. Then click “Next”
Ok, now you’re signed in with your Google account, you’ll see a screen below. This is where you can sign up for Google Analytics with your Gmail account. Click the “Sign up” button.
Next, you’ll be given choices to choose between a website or a mobile app. Since we’re installing a Google Analytics for a WordPress website, make sure you select “Website”. Then, you’ll be asked to enter the account information. Fill in your account name (this is your Analytics profile name for this website), website name, website’s URL, your website category, and the time zone. Click “Get Tracking ID” button.
You’ll see a pop-up window prompting you to accept the Google Analytics Terms of Service Agreement. You must agree in order to continue. So click the “I Agree” button to proceed.
Finally, your Google Analytics account is set up and ready to go. You’ll see the “Tracking ID” and “Website Tracking” code in the next screen. It should look like the below screenshot. The next step is to link your Tracking ID to your WordPress website. To do this, you’ll need both Tracking ID and Website Tracking code.
Leave this tab or this window open, as you’ll need the Website Tracking code for the next step (if you choose to add the Google Analytics code to your website manually).
STEP 2: ADD THE GOOGLE ANALYTICS CODE TO YOUR WEBSITE
There are two different ways to add the Google Analytics code to your website. The easiest and simple way is to use a plugin called MonsterInsights. The second method is to add it to your website manually. Â I’ll show you both methods. You can choose the one that fits your needs. If you’re a new blogger, I highly recommend using the plugin. It’s the easiest and by far the best way to go about doing this.
Using MonsterInsights
First, open a new tab on your internet browser. Go to your WordPress website and log in. Once you’re in your WordPress website, go to “Plugins” > “Add New”. Then, search for “MonsterInsights“. It should look like the below screenshot. Once you’ve found it, click “Install Now” button and activate it to your WordPress website.
PS: this screenshot is from my WordPress blog. So it says “Active” since I’ve already installed it. Yours should say “Install Now” like the one on the right-hand side. I’m using the free version. So this tutorial will be showing the MonsterInsight free version. You can use the MonsterInsights Pro version. It offers more advanced features like Ads tracking, E-commerce tracking, etc. The setup process is the same.
Once you’ve activated the MonsterInsights plugin, you’ll see a new menu item labeled “Insights” to your WordPress admin menu.
Next click on it, a setup wizard will pop up on the screen that will take you to the steps to connect your Google Analytic account. Then select a category that best fits your website. Click “Save and Continue” button.
A Connect MonsterInsights to Your Website wizard will pop up. Click on the “Connect MonsterInsights” button.
Then it will take you to your Google account login pop up where you’ll be asked to enter your Google login credential. Log in to your Google account if you’re not already signed in.
Then Google will ask you if you allow MonsterInsights to access your Google Analytics account. Click on the “Allow” button.
Next is to pick the profile website you want to track. You need to select your website from the drop-down box here. Make sure you pick “All Web Site Data” one. Click “Complete Connection” button to continue.
MonsterInsight will install Google Analytics on your WordPress website. Then you’ll be asked to select the recommended settings for your website. Click “Save and Continue” to save your settings.
TIPS: the default settings should work fine for most websites. If you’d like to track affiliate links, then you need to put the path you use to cloak your affiliates links in this box. This feature allows you to track your affiliate links.
If you upgrade to the Pro version, MonsterInsight will show you paid add-ons that you can access. If you want to skip this step, just click “Save an Continue” to skip this step.
A MonsterInsights Recommends WPForms will pop up. You can install it or simply click on “Skip this Step” if you don’t want to.
TIPS: The WPForms plugin is the best WordPress contact form plugin and works well with most WordPress themes.
You’re done! Keep in mind that it will take time before Google Analytics showing your stats.
TIPS: What I like about MonsterInsight is that you can view your traffic stats right on your WordPress dashboard. That way you don’t have to open another tab and login into your Google Analytics account. If you want to see a detailed report, you just go to “Insights” > “Report” page right on your WordPress dashboard. Â Most importantly is that you don’t have to update your Google Analytics on WordPress when your theme is updated. The MonsterInsight plugin takes care of that part for you.
Doing it manually by adding code in header.php file
This method is for advanced WordPress users who are familiar with coding. Please make a backup file before proceeding with this method. There’s a chance that you could break your site. If you feel confident dealing with code, you can simply add the Website Tracking code in your theme header.php file. Here I’ll show you how to do it.
First, log in to your WordPress website and navigate to “Appearance” > “Editor” from your WordPress dashboard. Find your theme’s Header file (header.php).
Click on the header.php to open the file. Then, find the “</head>” tag on that file. It should look something like this.
Finally, copy your Google Analytics tracking code right from the Global Site Tag(gtag.js) box from your Google Analytics account tab. And then paste it just above the “</head>” line. Remember, we left the Google Analytics account tab open previously. That way you can copy and paste the code without logging into your Google Analytics account again.
You can now click the “Update File” button to save changes and you’re done!
TIPS: when you update the theme, change your theme or when your theme is auto-updated, your code will disappear. You’ll need to manually add the code again. I don’t recommend this method if you don’t like to keep up with this task.
STEP 3: VIEW YOUR REPORTS
You can view your website stats either by log in to your Google Analytics account or your WordPress dashboard. For this tutorial, I’ll show you how to easily access your stats from your WordPress dashboard.
PS: make sure you wait for a minimum of 24 hours after you added the code to your site to see your stats. I would wait a few days or even a week to check your stats. 🙂
Log in to your website WordPress dashboard and navigate to “Insights” > “Reports”. You should see your reports look something like this.
You can click around to see different report metrics. Of course, the important question is “Which analytics metrics do you need to look out for?”. Well, it depends on the nature of your website or niche of your blog. However, there are a few key metrics that you should keep an eye on regardless of your niche. For example, Bounce Rate, Page View, Session Duration, Top Posts/Pages, etc.
- Bounce Rate: How long visitors stay on your website or the percentage of users exit your site on the first visit.
- Page View: A number of total pages viewed
- Session Duration: How long visitors stay on your page per a 30-minute session
- Top Posts/Pages: The most popular Posts/Pages visitors visited
- Behavior: What visitors do after they arrive on your site
- Acquisition: Where/How visitors found your site/came from
Summary
Google Analytics is a powerful tool when it comes to blogging. Especially, if you are looking to monetize your blog. It can help you see your blog strengths and weaknesses from a traffic standpoint. Not only does the insight you get from Google Analytics can help you improve your audience’s experience but also the invaluable information you get from traffic stats gives you ideas as to how to improve your site content.
I hope by the time you finish reading this post, you are able to follow my step-by-step tutorial and have Google Analytics installed on your WordPress site successfully. However, if you don’t have a blog yet and are interested to have your own blog. Head to my step-by-step on how to start a blog tutorial. If you have any questions, you can ask me in the comments section below. If you find my tutorial helpful, please share it and spread the love! 🙂
How do you install Google Analytics on your WordPress site?Â
What traffic metrics you find the most helpful when it comes to monetizing your blog?Â
Are there any other ways to install Google Analytics on WordPress?Â