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
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
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:
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.
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:
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.
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.
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.
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.
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:
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.
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.