A Beginner’s Guide to Installing Google Analytics

Google Analytics

Installing Google Analytics is essential in today’s web. Google Analytics a free web analytics service offered by Google that tracks and reports on website traffic. By Installing Google Analytics through a simple script placed on every page of your site, Google can track and report on a wealth of information regarding visitors and how they spend their time while on your website. By the end of reading A Beginner’s Guide to Installing Google Analytics, you will have a wealth of information at your fingertips ready to be uncovered such as:

• How many people visited and what the peak times were
• Which pages on the website are the most popular
• What browsers and devices were used
• Which pages have the least amount of conversions (and could use optimization)
• Where did converting visitors come from (top referring sites) and what pages were viewed

And thats just the beginning. With GA companies can optimize so much that it determines the content that gets produced next.

Let’s take a look at how to integrate into your website step by step.

1. Get a Google Account

If you have a personal Google account that you use for other services like Gmail, Google Drive, Google Calendar, or YouTube, then you should use that Google Account to set up your analytics. If not, you will need to create a new one. This should be a Google account you plan on keeping forever. Ideally the account is your own, and no one else has access to it. Google Analytics needs to connect to a Google account and once set up you can not change the email.

2. Set Up Your Account and Property

Once you’ve secured a Google account, you will need to sign up for a Google Analytics account. Here you will tell Google the website or app you would like to track via a url. In this section you will also select the type of business and preferred time zone. Google allows an individual email to have up to 100 accounts, 50 properties, and 25 views under one website property. For our purposes we will be creating 1 Account with 1 property, and 3 views. The amount of views will vary from site to site, but general best practices allow for a Master (Live) view, Test view, and a Raw view.

The Master View is your working live view. This view will include multiple filters that allow you to slice and dice the content as you want to see it. This view will also include all your data from which you will be making decisions.

The Test view is, as the name implies, a place where you can test all your goals, filters, and other item before deploying to your Master view. It’s always best to test and make all is working as desired.

The Raw view is your fail safe. If anything goes wrong in either of your two other views, you have a backup unfiltered view to manipulate. Always, always have a raw view.

3. Implement Your Tracking Code

Once you are finished, you will click the “Get Tracking ID” button. After a legal terms and conditions agreement you will then receive your Google Analytics code. The ID is unique to you. To properly install your analytics code it must be installed on every page of your website. How you built your site will determine how you deploy your tracking code throughout your site. For example, my portfolio site is built with html files and my blog uses WordPress. To properly deploy my code I will have to place my code in two different places: 1. On all individual portfolio pages, and 2. On my WordPress header.php file. For my portfolio I will have to cut and paste the code onto every html page of my site before the closing tag. This is best practice as it allows the code to initiate before any of your content does. This is also the case when placing code on a WordPress site, but instead of placing on every individual page it is recommended to install in the header.php file. Since the header file is typically on every page of a WordPress site it’s best to place here. And you’ll only have to paste once. It will then be dispersed to all pages that include your specific header.php file. Note that if you have multiple header files set up you will need to update these files as well.

Note – There are many other platforms where you can create your site. If you are using a different one then discussed above, I would recommend learning how to deploy your analytics code based on your specific platform. If you run into any problems, run a web search for your platform + installing Google Analytics. From there you will be able to follow specific directions for your needs.

After you install your tracking code on your site you have two options: 1. Use GA as is out of the box or 2. Create individual goals of which you can track desired user flows or when a form has been filled out.

To generate a goal click on the Admin link and then click goals under the View Column.

Goals can be of 1 of 4 forms:
1. Destination
2. Duration
3. Pages per Visit
4. Event

The most widely used tends to be a destination goal as you can set your form thank you page/successful form submission as a goal.

If you have similar goals that you want to track, you can repeat the above steps with the new information. You can track up to 20 goals per view. If you require additional goals beyond 20 you can create a new view for the sole purpose of tracking goals. Be sure to name it accordingly so you know what goals you are tracking.

And that’s it. You now have the tracking in place to see where your traffic comes from, what it does while on your site, and whether or not it becomes a lead. Next up check back to find out how to view how to read the data and the ins and outs of what the standard reports are, where to find them, how to surface the information you want, and filter information further to get more and more precise.

Photo by Edho Pratama on Unsplash