Google Analytics is a free, open source web analytics software program that allows you to track website traffic and activity. You can use Google Analytics to measure the success of your website marketing campaigns, understand how users interact with your site, and more. To set up Google Analytics for your website, first create an account on the Google Analytics website. Once you have logged in, click on the “Create an account” button. Enter your name and email address in the fields below and click on the “Create account” button. Once you have created an account, you will need to provide some basic information about your website. In this section, you will need to provide information about your website’s domain name and hostname (if any). You can also provide information about your site’s content type (text or image), pageviews per month, unique visitors per day, and more. You can also provide additional data about your site in other fields such as: pages visited per day or week; unique visitors per page; or total time spent on each page on your site. If you want to track these data separately for each language version of your site (e.g., English and Spanish), please add those languages into the “Languages” field below. Once you have provided all of the necessary information about your website, click on the “Create tracking session” button below to start setting up Google Analytics for your website!
What Does Google Analytics Do?
On the surface, Google Analytics simply provides you a way to track your website metrics. If you want to know how many users you have this week compared to last week, you can do that. If you want to know how long users spent looking at a particular page, it can do that too. It tracks most kinds of data around sessions and clicks.
Analytics also allow you to make better business decisions. Every business’s website has a goal, whether that’s increasing traffic to the site itself, or selling a service or product from that website. Analytics help point you in the right direction, and good analytics are the backbone of many online companies.
For example, if you’re publishing news stories, analytics can tell you which stories do well and which stories readers bounce away from quickly. If you’re selling products, analytics can tell you what users are clicking on the most. Analytics can also inform you about your target demographics, as it can track devices, countries, and even augmented data like gender, age, and interests.
Most analytics suites, including Google Analytics, offer A/B testing, which is like the scientific method for websites. Basically, you show one design to half your users, and a different design to the other half, and after a week or so, you go with the design that performs better. Good analytics power A/B tests, as they wouldn’t be possible without them.
RELATED: What is A/B Testing and How Can You Use It?
Setting Up Google Analytics
Head over to the Google Analytics dashboard and sign in with your Google account of choice. If this is your first site using it, you can simply click the “Start Measuring” button to set it up.
If you have an existing site, you’ll need to click the settings icon in the bottom left and click “Create Account” to add a new one.
You’ll need to fill out some basic info, mostly just setting a name for the property and website.
Once that’s done, you’ll need to set up a stream to ingest data. Click on “Web” to set it up for a website:
You’ll need to enter your site name as well as a tracking ID (you can have multiple ingest sources, if you’d like to) and click “Create Stream”:
You’ll be given a script that will link your site and Google Analytics. You will need to include this code somewhere on your site, wherever you’d like this stream to capture data from. If you have multiple streams, you’ll need to add it to an existing on-page tag.
Depending on your website architecture this can go many places, but typically it will go in your Index.html as well as every other page on your site. If your site isn’t making use of any frameworks, you’ll have to copy and paste this onto each page.
If you are using frameworks like React, Vue, or Blazor, you’ll need to simply include it in your “root” HTML file, which usually defines all global scripts and styles and provides a root element for the page to render into.
You can place it at the bottom of the body tag in either case:
If you’re using WordPress, you can read our guide to setting it up with a plugin, or add it manually to your site files.
RELATED: How To Set Up Google Analytics For a WordPress Site
At this point, your site should be linked, but unfortunately it will take 24-48 hours for most analytics to start coming in. In the meantime, you can verify that it’s actually linked by checking if you’re receiving any data under the “Realtime” tab.
Using Google Analytics
On your home page, it will display some basic useful analytics like user count, page views, and engagement. You can filter these by date as well as view certain statistics in real time.
Using “Behavioral Flow,” you can track users across multiple pages, and view how they use your site based on the string of their interactions.
Under demographics, you can view more info about the users using your site.
There are multiple tabs for tracking the user life cycle, such as:
Acquisition, which tracks how users are finding your site in the first place, Engagement, which tracks how users are using your site when they get there, and Retention, which tracks if users are coming back to your site.
There’s also “Monetization,” which is only enabled if you have your ad or ecommerce accounts linked.
Google Analytics tracks page views after users get there, but if you’re interested in learning about how your site is performing in search results, you should use the Google Search Console.
RELATED: Beginner’s Guide to Using Google’s Search Console for Your Website