Google Analytics is a powerful web service that gives you insights into your website. But exactly can it help you?

I’m going to cover a few things here. If you’re already familiar with the basics, feel free to skip around:

So let’s start from the top.

What is Google Analytics?

Google Analytics gives you the tools you need to better understand your customers. You can then use those business insights to take action, such as improving your website, creating tailored audience lists, and more. - Google's official documentation

More simply put, Google Analytics (GA) is a web analytics service provided by Google on the Google Marketing Platform. It allows you to track and measure your website’s traffic with powerful insights and reports.

GA can work a few different ways, but the most common is using a quick drop-in JavaScript snippet that goes on every page of your website (typically the <head>).

image-37
Google Analytics lets you measure user interaction with websites.

The base version of Google Analytics is free. You have the option of upgrading to the 360 suite, which will open up some feature limits, but most of you probably don’t need this as it is more geared towards high traffic websites.

Why do I need Google Analytics?

You don’t need it. But you can get an incredible amount of insight from GA with even a basic out of the box setup.

GA is helpful if you're a developer trying to get more traffic out of your blog, or a business trying to optimize your sales funnel.

GA helps you answer simple questions like:

  • Where is my traffic coming from?
  • What pages get the most traffic?
  • What are the most popular devices people visit on?

Not only can this help you make better-educated decisions with your website. It can also help you unveil user experience concerns, or save money due to site issues by keeping an eye on traffic trends and user interactions.

Okay, so where do I start?

Google makes it’s fairly easy for any developer to jump in and get started. The only real prerequisite is that you set up an account. Google themselves offers a great step-by-step and constantly updated guide, so I’ll leave it to them.

Getting the tag on your page

Once you’re logged into the Google Analytics Dashboard, go to the Admin section, which you can find on the left hand side of the page:

image-42
Admin link in the Google Analytics Dashboard

Once in the admin section, you can navigate to Tracking Info then Tracking code under the property you want to track.

image-43
Tracking code link in the Google Analytics Admin

Finally, you can find the JavaScript snippet that you can throw in the head of your website. Remember, this should be on ALL pages.

image-44
Google Analytic tracking code snippet

Let the traffic flow

From here you just have to give it time. Google Analytics won’t have historical data, it will only have the the new traffic that hit your page once the snippet was installed.

You can check it’s working by visiting the Realtime Report and either hitting the page in another tab or seeing your visitors hit the page.

image-45
Google Analytics Realtime Report

More settings, more configuration

Google Analytics is a complex machine and can do a lot. Start slow and try to understand what’s happening before moving too fast turning every different switch.

Once you're comfortable, there are a lot of great guides out there for beginners and advanced users alike to unleash the full power of your reporting capabilities.

super-saiyan
Goku going Super Saiyan

What are some quick insights?

Cool, so you have GA installed, you see your traffic, and you’re ready to get started looking at your reports, but where to begin?

What pages get the most traffic?

Let’s start with a simple one. Which pages of my website are getting the most traffic? To find this out we’ll want to view the Behavior Overview, which we can find by visiting Behavior then Overview.

image-46
Finding top page on Google Analytics Behavior Overview Report

Above we’re looking at the full month of August, which you can change with the date picker in the top right of the report. We can see overall, we had 3,853,265 total pageviews and 121,187 of them were to /news, the freeCodeCamp News homepage, which was our most popular page of the month.

Where is my traffic coming from?

A common question is: “where are people coming from?” How are people actually finding my website? This is a 2 parter, let’s start with overall traffic.

A good way to start is by finding the Acquisition Overview page. You can navigate there by selecting Acquisition than Overview.

image-47
Finding top traffic source on Google Analytics Acquisition Overview Report

Shown above, the majority of traffic comes from organic searches on Google, a little over 75% in fact. That’s some good SEO!

image-48
Outstanding Move

But what if we wanted to see how people are getting to a particular post? This involves a little more work, but let’s dive in.

Let’s go back to Behavior in the sidebar, then Site Content, and finally Landing Pages. Once there, you can use the search to find your post as shown below and select it.

image-49
Searching for a page on the Google Analytics Landing Page Report

After you found your post, we’re going to add a Secondary dimension. In particular, we’ll want to find and select “Source / Medium” in the Secondary dimension dropdown.

image-50
Adding a Secondary dimension on the Google Analytics Landing Page Report

Finally we’ll have an idea of where people are coming from to visit our post.

image-51
Finding the top Source / Medium on the Google Analytics Landing Page Report

It seems like this is following the trend of great Organic SEO. If you notice though, we have “(direct) / (none)” as the second highest source / medium.

Unfortunately, it’s not always that easy. And if Google Analytics can’t figure out where the user came from, it will mark it as “(direct) / (none)”. While that’s solvable, and sometimes actually means something, we can see the majority comes from simple searches on Google itself.

Understanding what devices your visitors are using is an incredibly helpful tool for optimizing User Experience, as well as maximizing potential revenue by making sure your site works.

In a perfect world, your website would work in all browsers. But we may be able to safely rule out certain older browsers.

image-52
Internet Explorer behind a tree

To get started, find your way to Audience then Overview. Once there, select Browsers in the list as shown below.

image-53
Finding the top browser in the Google Analytics Acquisition Report

We can see that luckily, our top browsers are dominated by modern ones, with Chrome carrying a cool 76.42%.

But wait, Internet Explorer is pulling 1.06% or 22,499, which isn’t something to bat an eye at. So let’s dig in a little more by clicking on Internet Explorer.

image-54
Finding the traffic for Internet Explorer versions in the Google Analytics Acquisition Browser Report

Phew, I think we’re safe. Now we can see how many people visit each version of Internet Explorer and luckily almost 99% of THAT traffic is IE9 or above. While we should be as inclusive as we can, this can help us determine priority and make decisions on what browser versions to officially support.

Real talk: 5 people on IE5? ?

Bonus: Advanced Insights

Out of the box, Google Analytics is powerful, but with some customization and deeper integration with your web data, you can give your analytics dashboard extra superpowers.

darkwing-duck-lets-get-dangerous
Darkwing Duck Let's Get Dangerous

Custom Dimensions

Custom Dimensions are what Google specifies as “non-standard data.” Really, they’re just additional data points that we can configure to get a better understanding of what makes our website unique.

For the sake of this article (maybe a later one), I’m not going to go into how to add Custom Dimensions, but Google provides a great guide to get an in depth understanding and a developer guide to go with it. What I’ll go over here is how to explore our reports once some Custom Dimensions are already set up.

What are our Custom Dimensions?

To start, we’ll talk about 2 specific Custom Dimensions: Author and Page Category.

Author is what it sounds like, it’s the person who wrote the article. Page Category in our case is the primary, top-level category that represents the post.

On freeCodeCamp News, you can specify as many categories as you want (do so responsibly), but the first one in the list is consider your “primary” category and is used when you see your post in listing views such as the homepage.

image-55
Post on freeCodeCamp News Homepage

What can we do with these?

The great thing is when we set these up, we attribute them to a page view. Once that page view is collected by Google Analytics, we can use it to search on, which is really what makes it powerful. Let’s start with Author.

Finding all posts from a specific Author

If we wanted to search for any post written by Quincy Larson, we’ll want to navigate back to Behavior, then Site Content, and finally All Pages.

Once there, we’ll want to add a Secondary dimension, similar when we added Source / medium, but now we’ll want to search for and select Author, which you’ll also find nested under the Custom Dimensions heading of that dropdown.

image-56
Selecting Author as a Secondary dimension on the Google Analytics Behavior Report

From there, we’ll want to select Advanced on the right (highlighted below), add our author’s name, and finally hit the Apply button.

image-57
Searching for an Author in Advanced Search of Google Analytics Behavior Report

After hitting apply, we now have all the stats we could ever dream of for the articles written by our author, Quincy Larson.

image-58
All posts from an Author in Google Analytics Behavior Report

You can also just type a query into the Google Analytics Search Bar.

Google Analytics has a search bar at the top, and you can just type natural language queries like this one:

Analytics
The results of a query for "articles by quincy larson past 30 days" shows the number of views each of Quincy's articles has gotten over the past 30 days.

Which categories are doing the best?

This is a trickier one. There are a lot of questions we may be able to answer with the basic reports like we did with Author, such as “out of all of the JavaScript posts, what has the most traffic?”, but maybe we want to know generally what category is the most popular on the site.

To do this we need to get our hands dirty with Custom Reports. This is too advanced to try to tackle in this post, but Google does a great job at outlining it in detail.

For now, I’ve done you a favor and set up a report that you can easily import to your account and use right away. So first thing’s first, let’s import the report: https://analytics.google.com/analytics/web/template?uid=4fHol2S_TZqcQACAwfcmfg

image-59
Importing a Custom Report in Google Analytics

Here you should see a screen like the above that asks us 2 things: where should we apply the report and what do we want to call it? If you’re an author of freecodecamp.org with access to GA and want to view this, you would select the All Web Site Data view under the freeCodeCamp News property.

image-60
Selecting a Property and View when importing a Custom Report in Google Analytics

Once selected, name the report what you’d like, such as “Top Primary Categories”, and click Create.

image-61
Custom Report showing top Primary Categories in Google Analytics

After it’s done, you’ll then land on the newly imported custom report where you can immediately see the most popular categories on the site, which for August is JavaScript!

Breakdown

This was a lot!

galaxy-quest-alan-rickman-tired
Alan Rickman in Galaxy Quest sinking in chair

But this is just the tip of the data iceberg. Even with just the above, you can see there’s a lot going on and a lot of configuration to make the most out of Google Analytics for your specific needs.

If this interests you, I encourage you to do some research on your own, add a new view (particularly a Test View to play around with), and get your hands dirty poking around the different reports. Otherwise, keep an eye out for more of my GA posts covering advanced installation and deeper insights.

Originally published at https://www.colbyfayock.com/2019/09/making-sense-of-google-analytics-and-the-traffic-to-your-website