How to Use Google Analytics with WordPress

Google Analytics is a free tool from Google that provides you with insights on your website’s traffic. This information can help you tailor your site to their needs, decrease your bounce rate, let you know the best time to schedule your posts, the type of content your readers are interested in, and how they came to your website in the first place.

Fortunately it’s easy to use Google Analytics with your WordPress website. Here’s a look at three methods to add it.

Create a Google Analytics Account

Google Analytics Create Account

First, go to the Google Analytics page and sign in with your Google account or create a new account. You’ll then see a screen like the one above. Click Sign up.

Select Website and enter the information and click Get Tracking ID and accept the terms of service.

It will provide you with the tracking script that you’ll manually paste within your WordPress theme. You won’t need this code if you plan to use a plugin such as the one we’ll discuss in this article.

Installing Google Analytics on WordPress

There are several methods for installing Google Analytics in WordPress. This shows them from hardest to easiest.

Method 1 – Add the Script to the Theme

This method requires a child theme so your code isn’t deleted when you update your theme. Also, you’ll have to add the code again if you change themes.

In your WordPress dashboard go to Appearance, Editor, select header.php and paste the code after the <body> tag.

All of your analytics will be available on the Google Analytics website.

Method 2 – Use a Plugin to Add the Script to your Header

This doesn’t require a child theme. You can change your theme and the code is still active.

Insert Headers and Footers is a popular plugin to add scripts to your headers or footers. If you’re using a premium theme it might have this feature as well. Paste the code into the field for your header scripts.

All of your analytics will be available on the Google Analytics website.

Method 3 – Use a Google Analytics Plugin

Using a plugin made for Google Analytics gives you the most functionality because you can see stats within your WordPress dashboard. This is the method that I use and the method that I recommend.

Google Analytics for WordPress by MonsterInsights is the most popular plugin to add Google Analytics and it’s easy to use. It’s available in both a free and premium version.

Install and activate the plugin and then configure your settings. In your dashboard, select Insights and click Settings. First click Authenticate with your Google account.

Select Click to Get Google Code and select the account you want to connect.

Click Allow and copy the code it provides and paste it into the field labeled Paste Google Code Here. Select the profile and click Next and then Close.

Once this has finished you’ll have access to your stats within the dashboard menu and on the Google Analytics page. It will take some time for Google to track your stats, so you’ll need to be patient.

Reports – Plugin Dashboard

It shows you the total page views per day, top posts and pages, top traffic sources, and top countries with the number of visits per country.

Reports – Google Analytics’ Site

You can also view the analytics at Google’s site. Here you can get insights on your average session duration, bounce rate, percentage of new sessions, pages per session, and more.

Final Thoughts

No matter how large or small you website is, you need information about your audience and how they use your website. Google Analytics is a great tool for this and Google Analytics for WordPress is my favorite method for adding it to WordPress. It’s simple and provides lots of useful information about your traffic and your website’s performance.

Leave a Reply

Your email address will not be published. Required fields are marked *