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:
- What is Google Analytics? (A quick overview)
- Okay, so where do I start? (Quick start install guide)
- What are some quick insights? (Basic out of the box reports)
- Bonus: Advanced Insights (Custom Dimensions)
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.
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:
Once in the admin section, you can navigate to Tracking Info then Tracking code under the property you want to track.
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.
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.
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.
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.
Shown above, the majority of traffic comes from organic searches on Google, a little over 75% in fact. That’s some good SEO!
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.
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.
Finally we’ll have an idea of where people are coming from to visit our post.
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.
What are the most popular devices people visit on?
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.
To get started, find your way to Audience then Overview. Once there, select Browsers in the list as shown below.
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.
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.
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.
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.
From there, we’ll want to select Advanced on the right (highlighted below), add our author’s name, and finally hit the Apply button.
After hitting apply, we now have all the stats we could ever dream of for the articles written by our author, Quincy Larson.
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:
Which categories are doing the best?
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
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.
Once selected, name the report what you’d like, such as “Top Primary Categories”, and click Create.
This was a lot!
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.