Google Analytics For WordPress – (The Complete Guide)
WordPress and Google Analytics is just like Batman and Robin. Some things can stand strong on their own, but when combined they create a sum far greater than their parts.
WordPress offers a solid variety of customization options for your website, but none of its tools will serve much purpose unless you know what’s working on your WordPress site and what areas you can improve.
Enter Google Analytics.
In this guide, we’ll show you
- Why you need website analytics,
- How this popular tracking tool works, and
- How to install Google Analytics without a pricey IT developer
What’s so special about Google Analytics?
Google Analytics represents the most widely used web analytics tool in existence (literally millions of websites use it), and for a good reason. It’s powerful, and it’s 100% free.
This reporting tool runs in the background of your website to capture site traffic, user behaviors, conversions, and other data in a dashboard-like interface.
Google Analytics excels at reporting
- Unique site visits,
- Number of pages per visit,
- Trends over time,
- What content is being looked at on your site,
- The pages that are not performing well,
- How long people stayed on your site or page,
- The geographical areas visitors come from,
- Where they came from before visiting your site,
along with a slew of other data you can use in tweaking your site for better performance.
In addition, you can easily integrate Google Analytics with your Google AdWords campaign and gauge how your PPC campaigns are doing in order to improve your ads.
But why does all this matter?
Let’s take a look at specifically how Google Analytics has gained its competitive edge:
- It’s an enterprise-level tool that packs a lot of tracking and reporting power.
- It’s fueled by the data giant Google, which means it can sift through data at lightning speed.
- It’s easy to draw conclusions from the data, even if you aren’t a “techie.”
- It helps website owners realize the importance of data and how it can be used to make site improvements.
- You can customize your dashboards to view information that’s most important to you.
- You can see real-time stats the moment you log in.
- The standard version, which is pretty epic, is free. No trials, no credit card needed.
Marketers realize the impact of data on campaigns, websites, and other customer facings in growing their bottom lines.
The days of guessing and “gut instincts” when it comes to understanding the customer experience are numbered.
Now, with a glance at an analytics dashboard, you can see where customers are intrigued and where they potentially lose interest.
You’ll know how many people see your website and where they are located geographically.
You can determine who is using a desktop and who is on mobile. All these bits and bytes of data can then steer crucial marketing and other business decisions that can catapult your company in a new direction.
And since data is so readily accessible and, in this case, free to collect and view, there’s absolutely no reason why you shouldn’t be using data to grow your business.
How Google Analytics Works
Though it may sound complicated, rest assured there’s not much work involved on your end to take advantage of Google Analytics.
From there, Google will give you a unique piece of tracking code you will need to place on your site. Voila! The tool will immediately start collecting and sorting data for you to view.
Once you do this, that tracking code will record site visitors’ actions and transform them into data.
Let’s dive into a few key stats Google Analytics compiles for you:
- Page Views – This is a number of unique web pages a single viewer visits during a session.
- Goals – This tells you how many people completed a particular action that you wanted them to, such as filling out a contact form or signing up for a newsletter.
- Bounce Rate – Just like a tennis ball bounces off the wall; this number tells you how many people visited your site and left without visiting another web page.
- Session Data – A session begins when a user lands on your site and ends when they leave your site. The number of sessions is equal to the number of individual site visitors you receive. Other session data include how long a person browsed your site and the number of pages they looked at during a session.
- Traffic Source – If you’ve ever wanted to know how people are finding your website, wonder no longer. This stat tells you how many visitors are coming from AdWords, a Google search, social media, other websites, etc.
Other than the initial installation and checking your dashboards, there’s no other work required on your part. Easy peasy.
Ready to get started? Read on for step-by-step instructions on how to begin using Google Analytics on WordPress.
3 Methods for Using Google Analytics on WordPress That Don’t Require a Developer
The biggest downfall of Google Analytics is that it doesn’t come pre-installed on your WordPress site.
Rather, you have to take the initiative to activate it yourself. But worry not, it’s much easier than you might be thinking.
And best of all, you don’t need to hire an expensive developer to get Google Analytics to start analyzing.
First, you’ll need to install Google Analytics on your WordPress website (more on that in just a moment).
To do this, you will need to sign up for a Google Analytics account (go here) before you can generate your tracking code.
But to get a Google Analytics account, you will need a Google account (sign up here). This account is also free and only takes a few minutes to register for one.
Once you’ve established your Google account, use it to sign up for a Google Analytics account.
During the signup process, Google will ask you if the account is for a website or mobile app.
Make sure you choose website. It will also prompt you to name your account, so make it something associated with your website
(Pro Tip: one Google Analytics account can power multiple websites, which is why you need to be specific when naming each account).
From here, you can click the Get Tracking ID button to generate your unique code. Highlight the code and click CTRL+C or right-click in the text and select Copy.
Here we’ve given you three options to add the tool to your WordPress installation. It’s up to you from here.
Option #1 – Manually Add Your Unique Tracking Code
Perhaps the most direct way is to add the tracking code to WordPress yourself.
Disclaimer: the slightest bit of coding knowledge is helpful in this case, but the steps below give a good outline that even savvy non-coders can successfully do it.
Once you copy your code from your Google Analytics account, log in to WordPress, find Appearances in the menu, then choose Editor.
There will be a dropdown with a list of themes. The current one will be already selected. Under that, there will be a list of files. Click the one that says “header.php.”
Scroll through the code to find the </head> tag. (Pro Tip: If you can’t find it in the coding jungle, the classic keyboard shortcut CTRL+F can find it for you).
You will need to paste your code immediately before this tag, then click Update File.
An alternative to this manual method is adding the code via the “functions.php” file. This method adds the code to each page on your WordPress site.
Go to Appearances > Editor, then look through the list of templates and click on “functions.php.”
From there, you will paste your code just prior to the closing </head> tag.
At this point, your Google Analytics code should be alive and well in your WordPress site. But don’t assume so.
Go back to your Google Analytics account and refresh the page to make sure you are collecting data.
If not, you can click “Send test traffic” to test your account. It could take up to 24-48 hours before you start seeing data, so be patient.
One caveat to mention with this method: if you decide to update or switch your theme at any point, you will need to reinstall your tracking code.
Option #2 – Insert Headers and Footers Plugin
It doesn’t get much easier than installing the free Insert Headers and Footers Plugin for WordPress.
This sleek interface lets you paste code without having to search through other code to find where to paste it.
Once you download and activate the plugin, login to WordPress and go to Settings, then click Insert Headers and Footers.
Paste your unique Google Analytics tracking code into the Headers box.
Make sure you save your changes before you exit, then test your Google Analytics account to ensure it’s collecting data.
As with the above method, it may take 24-48 hours to work, so give it some time.
One item worth mentioning: this plugin will not give you Google Analytics information in your dashboard. You can only view your metrics from your Google account.
Option #3 – Use the Google Analytics by MonstersInsight Plugin
Finally, our last method is one adopted by millions and has become the most popular option for connecting Google Analytics with WordPress.
MonsterInsights has created two plugins for WordPress – one free and one paid.
The free version is fairly robust, but you can pay a little more for advanced tracking and other features. Either way, you will set them up in the same way.
VIDEO HOW TO INSTALL THE PLUGIN
First, you’ll need to install and activate the MonsterInsights plugin (do it here).
This adds a new label to your admin menu. Go to Insights, then click Settings to set up the plugin.
Here you face two options: Authenticate with your Google account, or type in your UA code manually. Let’s look at both:
Authenticate with your Google account
While signed into Google, click the Authenticate with your Google account button.
Click Next in the pop-up window, then click the “Click to get Google Code” button on the next screen.
Another popup will ask you if MonsterInsights can access your Google Analytics data. Click Allow.
Highlight the entire code that appears on the next screen and select CTRL+C, or right-click and choose Copy.
Paste this code into the MonsterInsights popup window where you clicked the “Click to get Google Code” button previously.
From here, you’ll choose the profile you want the plugin to track. This is where choosing a specific name for each account comes in handy.
Enter Your UA Code
On the Settings page, tick the box that says “Manually enter your UA code.” A blank box will appear.
Click the Admin menu option in your Google Analytics account, then choose Property Settings in the Properties section.
Highlight the code and copy your entire tracking ID by pressing CTRL+C or choosing right-click then Copy.
You will paste this code into the “Manually enter your UA code” blank box in WordPress.
You’re done. Within a day or two, you should start seeing data trickle into your account.
Pro Tip: The MonsterInsights plugin does allow you to view your data directly from your WordPress dashboard.
This plugin serves up a few more steps than the Insert Headers and Footers plugin, but the convenience of having your data in one central hub makes the extra effort well worth it.
To view your data on WordPress, go to Insights on your admin menu, then click Reports to catch a glimpse of what’s happening. You can also go to the Tracking tab to tailor the info you see.
There’s a reason (actually several) why millions of website owners choose to pair Google Analytics with WordPress.
It’s simple to set up and use, it’s efficient, and most importantly, it gives stakeholders an inside look at how visitors engage with the site.
And though Google Analytics may be a free tool, you get substantially more than what you pay for. Try it for yourself, and you’ll probably agree.