The Importance of Website Analytics
As a website owner, it’s important that you understand how and why your website is performing the way it is by analyzing how many people are visiting your site, what drove them there, and how they’re engaging with published content.
The great thing about WordPress is that you don’t have to be a SEO professional or marketing managers to analyze performance metrics. Otherwise put, whether you’re a small business owner or you have a personal blog, you too can monitor your website’s performance by setting up Google Analytics on your WordPres site. Best of all, it’s completely free!
After installing Google Analytics, you’ll have instant access to wealth of data to better understand how your audience interacts with your WordPress site, including real-time data such visitor and page views, top page views, referral sources, and audience segments, to name a view. If you like, you can even directly manage your site’s performance from your administration Dashboard by installing the Google Analytics for WordPress plugin.
Of course, how you use this information is entirely up to you. With Google Analytics, you’ll be able to make educated decisions about the future direction of website. For example, you may find that certain content is bringing in more traffic that you imagined, which provides you with valuable insight into what type of content to create next.
What Information Does Google Analytics Display?
Google Analytics allows you to monitor and track:
- Visitor information: View the number of visitors coming to your site, where from (geographical location), and how many pages they are viewing
- Referral sources: where your visitors come from, whether it be from top referring sites, direct links, search engines, or social media platforms. Google Analytics breaks down the referral sources by category and the respective amount of traffic generated that is generated from each.
- Viewer’s Behaviors: Track how your viewers interact with your content by tracking where the user is going, the average time spent on the site, and your website’s bounce rate (the percentage of people who exited after viewing one page)
- Audience Segments: View whether your visitors are new or returning visitors, desktop or mobile viewers, etc.
- And much, much more.
Analyzing this information is incredibly valuable and should be taken into consideration when updated the design of your website to ensure that your website is compatible with the requirements of your primary audience.
There’s no guesswork involved when you have Google Analytics, it breaks down the referral sources by category and the respective amount of traffic generated that is generated from each. This information can be helpful for identifying which referral sources are working the best and which mediums you need to focus on improving.
Installing Google Analytics on a WordPress Site
Below is a simple step-by-step guide to installing Google Analytics into your WordPress site.
Step 1: Create an Account
If you don’t already have a Google Analytics account, you’ll need to sign up, don’t worry it’s free. Registering for an account is especially easy if you already have a Gmail account. If not, don’t worry, you can still create an account from scratch.
Step 2: Enter Website Information
After signing up, you’ll be prompted to select whether you’ll be tracking a website or mobile app, so make sure website is selected.You’ll have to enter some additional information about your website, which is fairly straightforward and includes your website’s URL, account name, location, and time zone.
Step 3: Get the Tracking Code
Once you’ve entered the required information, click on the “Get Tracking ID” button. After you agree to agree to the basic terms of services agreement, you’ll be given a tracking code. We encourage that you take note of this and keep it in a safe place. For now, simply copy it to your clipboard since we’ll be using it in the subsequent steps. Keep the analytics tab open as we’ll need to come back to it once we have embedded the code into our WordPress site.
Note: disregard the pop-up warning mention with reference to “using 3rd-party web hosting provider like WordPress.” This does not apply to self-hosted WordPress sites.
Step 4: Embedding the code
There are many different methods of embedding the code into your WordPress site. For most websites this step has traditionally been the most tedious; however, with WordPress it’s fairly easy.
We are going to provide you with two of the easiest and most popular methods. The first option is using a plugin. It’s very simple, so if your new to WordPress or don’t feel comfortable editing your template files, we encourage using that you use the plugin approach. The second option is to manually add the code to your WordPress theme’s template files.
Option 1: Install the Header and Footer Plugin
Now that you’ve retrieved your tracking code, you’ll need to download, install, and activate the Header and Footer plugin. If you’re not familiar with this process, check out our Installing Plugins video tutorial. Once the Header and Footer plugin is activated, click on the Settings panel menu item on the left-side navigation bar and click on the new Header and Footer sub-panel menu item. On the first tab entitled “Head and Footer”, enter your full tracking code into the “Every page” field below the title “<HEAD> SECTION INJECTION” and save your settings.
That’s it, Google Analytics will now begin tracking user data from your site.
Option 2: Manually Adding the Code
The second option is to manually add the code to your theme’s template files. This requires that you have a basic understanding of how to manage the content in your template files. To manually add the Google Analytics tracking code, follow the steps below:
1. From the admin area, click on Appearance from the navigation menu and click on the Editor sub-panel menu. This will open your themes style sheet.
2. On the far right column of the screen is a list of the template files. Locate the one entitled Theme Header (header.php) and click on the linked title to open the Theme Header template.
3. Once in the Theme Header template, you’ll see a long list of code. You’ll need to locate the tag: </head>. You may want to use your web browsers search function (CTRL+F or CMND+F on a Mac) to search for it. I did exactly that and was able to quickly find what I was looking for.
4. Once you’ve located the </head> tag, paste the Google Analytics tracking code immediately before it.
5. Once the code is pasted, hit the “Update File” button to save your changes.
6. You can check the status by going back to Google Analytics webpage and refreshing your screen. If it still hasn’t updated, you can click the “Send Test Traffic” button.
If the code is properly placed and Google is receiving data from your website, a small pop up window with your website’s home page will appear. Google will confirm that there is “1 active users right now (including 1 from test traffic) in the status dialogue box, which means that Google is successfully receiving data from your site.
We’ve experienced cases where it takes up to 24 hours for traffic data to show up in Google Analytics, so be patient. You can return to at any time to check the status of your account by logging into your Google Analytics account and clicking on the “Reporting Tab”.
Google analytics is a must have for every WordPress site, so get it now! We hope you enjoyed this article on installing Google Analytics in WordPress. If so, feel free leave us a comment or share it with your friends below.