How to Add, Set Up, and Use Google Analytics on your Website

Google Analytics logo

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on pinterest
Share on whatsapp
Share on email

You finally did it, you created your website and the page looks beautiful. You just polished off its design, optimized its performance, and maybe even did some search engine optimization (SEO). All of this to best attract viewers, shoppers, and fans all over the interwebs. Tons of time, money, and effort has been invested in your website’s success, so now what?

In order to truly maximize the returns your virtual website is getting, you need to keep in touch with how successful, frequently visited, and up to date, your website is. And to that, you need to keep track of user data—you need to use Google Analytics.

What is Google Analytics?

Google Analytics logo

First launched in 2005, Google Analytics is a web analytics service that is provided by Google. It gathers and presents data about website traffic through the use of a tracking code that records the various activities your users do when visiting your website. Then it offers you insights into how users find and utilize your website.

The two main types of data that Google Analytics collects are User Acquisition data and User Behavior data. The former involves data about your users before they visit your website, such as what browser they used and which search engine referred them. The latter involves data about your users when they use your website, such as how long they stayed on certain pages and what forms they submitted.

With Google Analytics you can also integrate other Google products into your website such as your Ads account and Search Console, creating a central hub for all of your outreach campaigns.

They also have a version that gathers user data from iOS and Android apps called Google Analytics for Mobile Apps. For this article, we’ll be focusing on the website data service.

Why Google Analytics?

Google Analytics can track the number of visitors to your website, the keywords they used in order to find it, how long the average user stayed on your site, and so much more. It can also pinpoint flaws in your website, such as poorly performing pages. For more discerning users, Google Analytics can also track user-set conversions, or goals, including sales, lead generation, the number of times a specific file has been downloaded, and much more.

This may seem like a lot of raw data. However, keep in mind that your website is probably the main source of your company’s digital presence—your users will inevitably stop by your website during their online journey.

So, by analyzing this data, you can learn how to better streamline your pages in order to retain user attention, increase traffic, and improve conversion rates.

As of 2019, Google Analytics is the most widely used web analytics service online.

How to Add Google Analytics to a Website

Adding Google Analytics to your website is a lot simpler than one might think.

  1. First, decide which Google account to use to set up a Google Analytics account. This account can be your own personal, primary Google account, or a company account that only you can access. It can also be a new account created specifically to access your Google Analytics data.
  2. Make sure that this account is one you plan to keep forever and is fully accessible to you. While it might seem more convenient to allow your web designer or SEO person to make and manage your Google Analytics account, it has its own dangers. If for some reason you two have to part ways they will take your Google Analytics data with them, and you’ll have to start collecting information from scratch. Remember, when it comes to data analysis the more information, the better.
  3. Once you have selected a Google account, go to www.google.com/analytics/ and select “Access Analytics.” Then you add your website’s information, such as website address, time zone, and an account name, and then accept the user agreement.

That’s it! Now, to start utilizing Google Analytics’ services on your website, read on to see how to set up the code on your website.

How to Set Up Google Analytics

graphic of a man pointing on a screen with SEO written on it

The main force behind Google Analytics’ services is the tracking code. The tracking code is a copy and pastable string of HTML code that needs to be added to every page on your website that is going to be tracked.

If you have just created your Google Analytics account, then the tracking code is on the page that shows up right after you accept the user agreement.

If you already have an account with Google Analytics, then after signing in select the account you want from the Overview page.

From there, choose “Edit” from the Actions column. On the top right corner of the Main Website Profile Information box, click “Check Status.” Finally, the tracking code can be found under “Instructions for adding tracking.”

As the tracking code is just HTML, all you need to do to add it to your website is copy and paste it under the closing head tag of your web page’s HTML.

In order to verify that the tracking code is properly working, return to the Overview page on the Google Analytics website. Select your website’s account and click on “Edit” under the Actions column. On the top right section of the Main Website Profile Information box will be a link titled “Check Status.” There you will be able to check if the tracking code has been correctly installed into your website!

After a 24-hour calibration period, Google Analytics will start tracking your website’s data.

How to Use Google Analytics to Optimize Your Website

Everything’s been installed perfectly—so what’s the next step?

Google Analytics gives you the tools to help make the best decisions for your website. Using the data, it collects on user information, you can determine where your advertisements should be, where to spend more on campaigns, and figure out what type of content you should be creating.

General Report

To monitor Google Analytics’ findings, go to the Reporting section of its website. There, you can find basic information about the number of views you’re getting, how long visitors are staying on the pave, and what percentage are bouncing off.

If you want to see some more in-depth information about the traffic in your website, you can use the Dashboards menu on the left side of the site to see information about how many active users are on the site at the moment, how many new visits there were, etc.

The dashboards are customizable as well. By clicking “+Add Widget” under the Dashboards menu you can add and remove widgets that do or do not pertain to your website’s needs. You can also create new Dashboards to monitor specific pages on your website.

Finally, if you’re finding that your employees’ activities are disrupting Google Analytics’ traffic tracking data, you can click “+Add Filter” to show or hide specific traffic.

Setting Goals

It might sound a bit odd, but one of the most important parts of Google Analytics is setting goals. Not the kind that marks milestones and important achievements, but the kind that represents a completed activity, or a “conversion,” that lends itself to your business’ success.

The Goals feature lets you track specific interactions from the visitors who visit your site, such as button clicks, account creations and form submissions. When that specific interaction is conducted, it is recorded that as a “conversion.”

There are four types of interactions that Google Analytics goals can track:

  1. Destination, or, the actions by each user.
  2. Duration, or, the duration of each visit.
  3. Pages/Screens per session, or, how much each page was visited.
  4. An event, or, the number of button clicks, files downloaded, video views, etc.

Let’s break that down into the specifics.

Destination Goals

graphic of wooden standees with domain names written on each

Destination goals track when a visitor arrives on a specific page, allowing you to know exactly how many people hit your “thank you!”, order confirmation, and add to cart pages.

In order to create a Destination goal, head over to the Admin tab, and select the Goals section. Click on “+New Goal”, name it, and select “Destination” under Type.

Select the URL match type that best suits your needs:

  • Choose “Equal to” if there is one specific URL that you want to track.
  • Choose “Begins with” if you have campaign URLs with UTM codes that lead to multiple other pages. That way, regardless of what comes after the URL Google Analytics will still record it.
  • Choose “Regular expressions” if you want the define the URL yourself. This is a more advanced choice that allows you to manually input all your parameters.

Next, write or paste in what URL you want to track. Make sure it’s the information that comes after the domain. (For example, just “/thankyou/html” instead of “www.example.com/thankyou.html”).

If there is a certain monetary value you’re aiming for, toggle the “Value” option.

Additionally, if there is a certain path that users should be followed after landing on the goal URL, toggle the “Funnel” option and define that path. This works well to verify whether or not your goal URL is properly guiding users through a series of web pages.

Finally, if you want to test if your Goal has been well defined, click “Verify Goal.”

When you’re satisfied, save everything and hit done!

Duration Goals

Compared to Destination goals, Duration goals are simple. They track how long site visitors stay on certain webpages before leaving, giving you an insight as to the user engagement level of your website.

When setting up this goal, you do the same as with a Destination goal except you select “Duration” under the type. Then, select the length of time you want to be tracking. If you want to see how many people stay on your website for more than ten minutes, then you simply set the duration as “greater than 0 hours, 10 minutes, 0 seconds.”

Take caution when selecting how long you want the duration to be, as too short or too long of a period won’t help you decide how to make improvements to your site—just to your Goal’s terms.

Once again, you can assign a monetary value and verify the Goal’s performance as well. This can be where you test how accurate your time duration is for your purposes.

Finally, save everything and you’re done!

Pages/Screens per session Goals

This Google Analytics goal tracks how many pages a site visitor sees before exiting your website. While it might seem redundant, as the Durations goal also tracks something similar to this, the Pages/Screens per session Goal can help you target which sections of your website are weak in user engagement.

To create this goal, select “Pages/Screens per session” underneath the Type section. Then, select the number of pages per visit that you want to be recording. If you want to track the number of visitors who look at more than 2 pages per session, select “greater than 2.”

As with the Duration goal, you can assign a monetary value and test your page selection with the “Verify” option. To finish, click Save and Done!

Event Goals

The final goal type, Event Goals is the miscellaneous category that can track site visitor interactions that Google Analytics does not record by default. Those specific visitor interactions are dictated by Events, which are set up separately from the Goal.

Some of these interactions include:

  • Time spent watching a video
  • Number of clicks on email addresses or phone numbers
  • Number of clicks on outbound links
  • Online form conversions
  • Number of downloads

Because of its varied nature, this is the trickiest goal to set up.

To start creating an Event goal, first, you need to create a custom event. You can do this in two ways: through Google Tag Manager, which helps with the coding, or by manually adding an event code for the action you want to track.

Regardless of how you choose to do it, make sure that your event has at least these three details:

  1. Event Category: The name for the action that occurs (ex. Email Subscription)
  2. Event Action: The action itself (ex. {{Form ID}})
  3. Event Label: The specific location or name for the action (ex. {{Page URL}}). Although this step is optional, it’s highly recommended if you are tracking the same action through multiple different pages.

graph of analytics shown on screen with speech bubbles with icons inside

Make sure you have all of this information as well as the event values for when you create your Event Goal.

Before jumping back into the Goal page, verify whether the custom event is working on Google Analytics. From the homepage head over to Realtime and then Events. Have someone perform the action that is being tracked so you can how it’s being reported in Google Analytics.

If you see a positive increase in data, then you’re all good! If Google Analytics is reporting nothing, then try messing with your custom event’s set up.

Once you are done planning out your custom event, it’s time to create your Event Goal.

Like with the other goals, head over to the Admin tab and select the Goals section. Click on “+New Goal”, name it, and select “Event.”

Copy the goal Category, Action, Label, and Value if you have it. When it comes to selecting the match type for the values, select the one that is most pertinent to your needs.

  • “Equals to” is the most exact of the three options, and should be used if your value is unchangeable.
  • “Begins with” should be used if you have multiple conditions that start with the same part.
  • “Regular Expression” is the most flexible as it allows you to manually include multiple conditions. However, it requires knowledge on RegEx, so it’s also one of the most advanced options to select.

Then, all you have to do is verify the goal’s viability, hit save, and press done!

Goals Reports

Finally, you have set up as many goals as your heart desires! You might be wondering where to best access the results from these goals as well. Google Analytics offers many reports on many results, so here is where to find the three most valuable reports on the site.

Traffic Source

Go from Acquisition to All Traffic and then Channels. There you will find which channels contribute the most to your goal completions.

Landing Pages

To find this report, go to Behavior, then Site Content, then Landing Pages. The Landing Pages report lays out the pages on where users who have completed goals first landed on your website.

Goals

Pretty straightforward! It’s found under Conversions and gives general information about how your Goals were completed from Goal URLs to Reverse Goal Paths.

Conclusion

This all may seem complicated, especially for site owners whose focus is on selling their brands and products and not on website maintenance.

However, Google Analytics is a powerful tool once you’ve mastered its basic functions. It offers you a deeper understanding of how your users work on the virtual level, something crucial that’s missing from e-commerce and communication.

Use this guide to help you understand how to best use Google Analytics. If it works, you’ll be able to best guide your own users’ experience.

Get a Free Consultation for Your Website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

More To Explore

Contact Us

Say hello or ask a question.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Search For: