Google Analytics is a fantastic and free tool that you can use to collect a huge amount of information?about the people who visit your website.
This post will be one of several detailing Google Analytics and its many features. This time we’ll look at how to install Google Analytics on your WordPress website and how to read some of the basic metrics describing your website’s traffic.
Installing Google Analytics on Your Website
The first thing you’re going to want to do is head over to?www.analytics.google.com and log in using your Google account. If you’ve never logged into Google Analytics before you’ll see something that looks like this:
Click on the Sign up button on the right.
You’re now going to be on a screen to set up a new Google Analytics account. Google Analytics organizes itself into Accounts, Properties and Views. You can have multiple websites under one account and frustratingly enough you can’t move them if you want to reorganize your websites in Google Analytics.
Since this is your only website for now don’t worry about this.
The first thing you can select is whether you want to track a website or mobile app. This guide is going to only focus on websites so go ahead and make sure that’s selected.
Next you get to name your account. As mentioned before accounts are the top level of organization in Google Analytics and you can have multiple websites under one account. Give it a name that makes sense to you.
Next you’ll?set up the property under the account. This is the website you want to track so go ahead and enter?your website’s information.
The last thing is the data sharing settings where you can choose what services your data is going to be shared with.
You don’t really need to worry about this so you can either leave them all checked or uncheck them all, it doesn’t matter as far as tracking your site goes.
When you’re all ready click on Get Tracking ID.
If a Terms and Service agreement pops up just click on I Accept.
You’re now going to see a screen with a bunch of complicated looking code that looks like this:
The first item of interest on this page is your Tracking ID. Every one of the websites you are going to track using Google Analytics will have their own tracking ID starting with UA- followed by a bunch of numbers.
Some WordPress themes are set up so that all you have to do is copy and paste this tracking ID into the theme settings and you’re good to go.
If you’re theme doesn’t have that option then the next best thing is to use the code in the big box under Website tracking.
This code needs to be pasted into the head section of your website right before the closing </head> tag. If you’re not familiar with HTML code check out this introduction to basic HTML.
WordPress doesn’t make it super easy to edit your site’s code but there are a couple of different ways you can implement the code on your site.
You’ll see options for PHP implementation, Dynamic Content Implementation and Google Tag Manager. Don’t worry about any of these, we don’t need to use them.
1) Installing Google Analytics with the Genesis Framework
If you’re using the Genesis Framework then it’s super easy to install the code.
In your WordPress Dashboard go to Genesis > Theme Settings and scroll to the bottom to Header and Footer Scripts.
Then simply paste that big blog of tracking code into the Header Scripts box and it’ll automatically be added to every page of your site in the correct location.
Remember to hit the Save Changes button at the bottom when you’re done.
If you’re not using the Genesis Framework then it’s a bit more work.
2) Installing Google Analytics by Editing Your header.php File
If you don’t have a spot in your theme settings for the tracking code you can enter it by editing your theme’s header.php file. This sounds a little bit scary but it’s actually pretty simple.
In your WordPress Dashboard go to Appearance > Editor.
You’ll see a screen that looks kind of intimidating like this:
It’s not a good idea to mess around in here unless you know what you’re doing.
On the right side is a list of the files for your theme. Make sure your currently active theme is selected in the drop down menu and look for the file named header.php.
I have the Genesis theme selected and is says Theme Header as the name of the template. Keep in mind that other WordPress themes might have different names for the template so you want to look specifically for the one that says (header.php) and click on that one.
The box on the left has all the code for that template file. If you’re worried about screwing something up feel free to copy all the text here into a text document or something so you can always paste it back if something goes wrong.
In the code look for the closing </head> tag, it’s not hard to find.
Put the curser right in front of the </head> and hit Enter/Return to drop it down a couple of lines and give yourself some space.
Then paste in your Google Tracking code in that space you created in between the ?> and the </head>.
Once the code has been pasted there scroll down and click on the Update File button to save your changes.
If this method seems a little bit intimidating here’s one more using a WordPress plugin and it’s very easy.
3) Installing Google Analytics with the MonsterInsights Plugin
Head over to Plugins > Add New and Search for a plugin called?Google Analytics by MonsterInsights.
There are a ton of Google Analytics plugins out there and a lot of them are very frustrating to use. This is the best and easiest to use one that I’ve found and it has the added bonus of showing some of your Google Analytics data in your WordPress dashboard.
Install?and activate the plugin. There’s now a new option at the bottom of the menu on the left side of the WordPress dashboard called Insights. Click on Insights > Settings
You’ll see a screen that looks like this:
If you’re logged into your Google account in the same browser already then all you need to do is click on the Authentic with your Google account button.
A pop-up will appear asking you if you want to give the plugin permission to access your Google account. Click the Allow button.
It’ll then give you a long code to copy and paste.
Copy the code and return to your plugin which makes it very obvious where to paste the code.
Paste in the code and click the Save authentication code button and that’s it. The settings should change and then just make sure you’ve got the right website selected in the Analytics profile drop down menu.
There should only be one site there if this is a new account, make sure All Web Site Data (UA-XXXXX) is selected and hit save and you’re all good.
Viewing Your Website’s Traffic Data
Google Analytics properly updates itself every 24 hours so it’s best to check the data at most once a day. By default it won’t even show you the data for the current day. You can force it to show you this data if you want but it’ll be incomplete.
Since you just installed the tracking code on your site you’re going to have to wait until tomorrow anyways before you even start getting data.
When you log into Google Analytics the first thing you usually see is the Home screen which looks like this:
You can return to this screen at any time by clicking on Home in the menu at the top.
You’ll see there’s only one website here right now and no data because we just set it up. The Account is first, mine is called “Account Name” followed by the property nested under it which I’ve called “Website Name” and then you have “All Web Site Data” underneath that which is the view. It always goes Accounts > Properties > Views and this is the simplest set up for one website.
Normally here it’ll show you some quick data for each of your websites but since this was just set up there’s no information here yet.
You can select a date range in the upper right and by default it’s always set at the previous 30 days.
To check out all the information collected about your website click on All Web Site Data underneath the property for the site you just set up.
For this example I’ve pulled up the Google Analytics profile for one of my existing websites. The screen will look something like this after it’s collected some data:
This is the basic and probably most important information for your website and you can go very in depth into all kinds of different information if you want.
For now though lets go over this screen and what everything means.
At the very top you see what’s called a segment for All Users (that’s the only segment I have, it’s set up by default). If you click on +Add Segment you can create a new one.
Segments are for a little bit more advanced reporting and you probably won’t need to worry about them. What they do is let you create different groups of users based on what they do on your site and then pull different reports for each group.
For example you can create a segment for everyone who made a purchase on your site to see how they interacted with your site. Information like this could help you optimize your online store to make more sales.
The next big this is a line graph that by default shows the number of sessions for the selected time period.
In the drop down menu you can select from several?different metrics and even plot one against another one.
Before we go any further lets define what each of these metrics means.
Sessions: This is how many times someone came to your website. If a person visits your website twice in a day then that counts as 2 sessions.
Users: This is how many unique individual users came to your website. If a person visits your site twice in a day then they’re only counted as one person.
Pageviews: this is how many times a page on your site was viewed. A user could visit your site and look at 5 pages which would count as 5 pageviews. If the same user visits the same page more than once then that still counts as multiple pageviews.
Pages/Session: this is simply how many pages the person visited during their visit to your website. The more pages they visited then the more interested?and engaged they were with your site usually.
Avg Session Duration: this is how long a person was on your site for. The longer the amount of time the more they were engaged with your site.
Bounce Rate: this is a measure of how many people visited a page on your site and then immediately left without clicking through to another page. A bounce rate between 40% to 55% is pretty average. Lower than that is fantastic. The general bounce rate can be completely different depending on what sort of industry or topic your site is about though.
% New Sessions: this is an estimate of how many of the sessions you had were by people visiting the website for the first time.
Beside the above information is a pie chart showing what percentage of the visitors for that time frame were returning visitors or visiting your site for the first time.
Below all this you can get some interesting demographic information such as what language your visitors speak, what country and city they’re from, what browser, operating system and Internet service provider they’re using and if they’re using a mobile device you can see what operating system they’re using, who their service provider is and even their screen resolution.
Right now all this information is being shown for your entire site for the selected date range. One of the best things about Google Analytics is how customizable everything is. You can pull this information for individual pages on your website for example or pull the information for everyone who visits your site using an iPhone.
There’s lots of other incredibly useful things you can track too and I’ll cover some of the most useful things here.
Useful Information About the Visitors to?Your Site
On the left side of the screen there’s a menu with a few main options: Dashboards, Shortcuts, Intelligence Events, Real Time, Audience, Acquisition, Behaviour and Conversions.
The default view we looked at before was under Audience > Overview.
The Audience section contains all the information about the people who visited your site.
The Demographics option needs to be enabled before you can use it. Once it’s enabled it’ll take up to 24 hours before the data starts coming in but once it does you can get information about the age and genders of the people visiting your site.
The Interests section also needs to be enabled and once it is it’ll show you some information that will be relevant if you plan on running Google Adwords campaigns in the future.
In the Geo section you can see information about the language your visitors speak and their location. You’ll get a table?that looks like this:
Here you can compare things like their country or language to metrics like sessions, bounce rate, etc. and find out information like say people from one country really like your site and visit way more pages than people from another country.
The Behaviour section will show you information about things such as how new vs returning visitors interact with your site.
The Technology section shows you information about their web browser and Internet service provider. You get a similar table like you did in the Geo section.
You might be wondering why you have information like their browser and there’s lots of reasons. For example if you notice one browser has a super high bounce rate and low pages/session then your site’s probably broken in that browser and you should fix it.
The Mobile section has similar tables of information and you can check the behaviour of different devices like smartphones and tablets.
There are some other sections located under audience that get into some more advanced things but I won’t cover them in this post.
Tracking?the Behaviour of Users on Your Site
The next major section to look at is the Behaviour section. This section contains all kinds of information about what your audience actually does on your site.
Going to Behaviour > Overview shows you a screen similar to the audience overview one.
There’s some new metrics here. Unique Pageviews are like regular pageviews except they’re only counted once. If a user visits the same page more than once it’s only counted as a single unique pageview.
Avg. Time on Page is simply how long people spent on a page on average. The longer the time the more engaged they were with your page.
% Exit is the number of exits divided by the total number of pageviews. An exit is simply when someone left your site. The higher this percentage then the less pages people viewed before leaving your site.
At the bottom under Site Content you’ll see a section that shows you your top 10 pages and how many page views they got. Page and Page Title show you the same data, one just has it displayed per page URL and the other has it displayed per page title if that’s easier to read.
Back to the menu on the left if you go to Behaviour > Site Content > All Pages you can see a table of different stats about the different pages on your site.
This is a really cool view because you can see information like the amount of time people spent on a specific page or the amount of people who left your site after viewing that page.
Seeing How People Found Your Site
The other major section you’re definitely going to want to check out in Google Analytics is the Acquisition section which is in the menu on the left.
If you select Acquisition > Overview you’ll see a screen that looks like this:
This section will show you all kinds of information about how people arrived on your site.
Organic Search is the people who searched for your site on Google or other search engines and arrived by clicking on a search result.
Direct is the people who reached your site by typing your web address into their browsers and going directly to your site.
Social is how many people came to your site by clicking links on their social media sites.
Referral refers to the people who reached your site after clicking a link on another website.
You can of course pull all kinds of information like bounce rate, pages/session, time on site and compare the different traffic sources.
In the Menu on the left if you select Acquisition > Channels > All Traffic you’ll see a familiar looking table:
If you click on Organic Search you’ll get?the same table but it’ll show you the exact words people typed into Google to find your site which is pretty cool.
Unfortunately though the top result will be (not provided) which means those users opted out of the Google Analytics tracking. That’s about 93% of the results for this particular site unfortunately.
The information here though shows what people are searching for to find your site and what sort of topics and keywords you’re already ranking pretty well for.
If you click on Social you’ll see a similar table showing the traffic from social media sites.
This site as you can see gets almost all its social media traffic from Reddit and Facebook.
If you click on Direct you’ll see a similar table but it’ll show you the top landing pages. Your home page will be right near the top but other pages will show up here if for example someone has bookmarked a page on your site and visits it like that.
The Referral section has a similar table to the Social Media section but it shows all non-social media websites that people visit your website from.
That pretty much covers all the main and most important parts of the Google Analytics dashboard.
Google Analytics can provide you with way more information than we covered here though and I would encourage you to poke around and explore your data after you have a few weeks of data come in.
No matter what you look at in here you can’t break anything so feel free to check out all the different sections. If you mouse over a lot of things a tooltip will pop up that will explain what it means so you can figure out a lot of this on your own too.
I plan to make other Google Analytics posts in the future that’ll cover things like website goals and conversion tracking so look forward to those.
If you have any questions or there’s anything you’d like me to explain further let me know in the comments.
This post appeared on the Realty Digital Marketing Professional Community here:?How to Use Google Analytics to Track and Analyze Your Site?s Traffic