How to Begin with Google Analytics

Alex Centeno

Director of Digital at AndiSites Inc.
Alex is AndiSites' Director of Digital. He writes on all things digital, including web design, development, SEO, online marketing, photography, and video.
Alex Centeno

What is Google Analytics?

Google Analytics is a web analytics software that keeps track of the visiting patterns of web users and reports the findings, even in real time. When I first started using the tool, it was called Urchin, and it had to be installed at the server level. I remember thinking, “This is one of the coolest web marketing ideas ever.” Google acquired Urchin in April of 2005.1

The reports include all sorts of useful information such as number of visits, time spent on those visits, what pages are most visited, and the map view location of the people visiting the site. And Google Analytics offers much more.

So let’s say that you want to redesign your hotel booking website, and you hear that clients are now booking their reservations from their iOS devices instead of from their desktops. Instead of just believing hearsay, you can take a look at your Google Analytics reports for screen devices and sizes being used to complete bookings. That gives you a true representation of your business situation.

Why is that important?

It’s important because the digital media world is more and more competitive every day. Thousands of websites are created daily and all compete for our attention. Building a website that is easy to use, intuitive, and beautiful is not easy; but with the help of Google Analytics, you can do it with informed expertise.

How do you install the Google Analytics tracking code?

To install Google Analytics on your website you must visit the Google Analytics platform and create a new account. Then add a property by clicking the Admin menu at the top (see screenshot below).

add-new-property-google-analytics

Enter a name for your website, the main URL for the site (i.e. http://www.AndiSites.com). Select your industry category and the appropriate reporting time. Finally, hit the button that says: Get Tracking ID.The platform will now give you a Tracking ID and a Website tracking code that looks like this:

        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          ga('create', 'UA-xxxxxx-x', 'auto');
          ga('send', 'pageview');

        </script>

These two items are the basis for tracking your website traffic. The UA tracking code is the unique identifier for the property you created in Google Analytics. The website tracking code is a JavaScript code called every time a tracked event is fired. For example, by default page views are tracked. Thus, every time that a user goes to a page that includes your tracking code, the script will be called, and the page view will be recorded. It is important to remember that the tracking code must be installed on every page of your website. If not, tracking will not work properly. With content management systems, such as WordPress, adding the tracking code can be as easy as modifying one line of code in the footer.php file or simply installing one of the many great plugins that will take care of that for you.

Also, it is important to remember that unless you look at Real Time reports, you won’t immediately see the visitation information. In fact, it may take an hour for your reports to start reflecting what is happening on your website. Finally, make sure to check the correct date ranges to filter the information that you want to see.

How to setup Goals

So now the basic installation is in place, and it is time to start tracking goals. Goals are notifications that the script sends to the reporting platform when a pre-determined event happens. For example, if your website has a contact form, you can assign a Goal to the “thank you” page that is shown to the user right after they complete the form. When the user submits the form, they are redirected to the “thank you” page and the Goal is reached.

Google Analytics detects that this has happened and marks the goal as achieved. It can also assign a dollar value to the achieved goal based on your estimations. This is particularly important for lead generation and eCommerce websites to track the value of interactions over time.

To setup the goals you would go to:

Admin > View > Goals > New Goal
  1. First, give your goal a name. Remember to be descriptive of the action that the user is taking on the site. Instead of calling it “Goal #1” – give it a name that would mean something useful when checking the reports, for example: “Contact Form Submitted”.
  2. Select a Goal Slot. Each View has a total of 4 sets of 20 goals. But you can create up to 50 views per profile, in case you need more.
  3. Select the type of goal you are setting (see below). type-of-goalsThere are five kinds of goals: Destination, Duration, Pages/Screens per session, Event and Smart Goals2 (Smart Goals are only available if you connect your Google Adwords account to your Google Analytics account). The most frequent goal is “Destination”–as we demonstrated in the above example.
  4. Define the “Goal Details”. This is important.
    • In order to track a particular page, you need its URL. You must include the part that is to be matched. For example, if you want to enter a destination with path: /thank-you.html – make sure not to enter: www.website.com/thank-you.html or thank you.html. Neither of those would work.
    • Solving another possible problem depends on the configuration of your server, which may allow different URLs to reach the same page (e.g., with case-insensitive redirection). For example, let’s say your website has forms that point to THANK-YOU.html and Thank-You.html, and both of them actually work in the website. They won’t work properly in the goal destination, unless you uncheck the “case sensitive” box.
    • Also, if you have parameters added to the end of your path, such as thank-you.html?id=2344 , then an exact match won’t work either. Thus, you must take a closer look at how your website form behaves before you try to track it as a goal. If your form includes additional parameters, you may use “Begin with” or “Regular Expressions” to use as the match, instead of “Equals to”.
  5. You can assign a monetary value to the completion of a form. Say for example that one out of twenty “Request for Quote” forms submitted on your website results in a sale. The average sale is $200. That means you can assign a $10 value to filling out the form.
  6. You must determine a “funnel”. A funnel includes the different steps that a user takes to reach a goal. In our example, you set up a funnel and define the form page as part of it. Since we know that we want people to get to the “Thank you” page, we make them submit the form.
  7. Finally, hit the “Verify this Goal” link. This checks your previous analytics data against the goal to see how many times the goal would have been accomplished based on the data from the past seven days.
  8. Hit Save.

Now go to:

Reporting > Conversions > Goals > Overview (see below screenshot).

conversions-goals

Here you will see the newly added Goal and its results.

Concluding thoughts

You now have a full installation of Google Analytics on your website, and you have started tracking goals that give you feedback on how your website performs. These two things are the basis for a strategic marketing-driven approach to web media. Imagine the possibilities as you grow understanding your audience’s needs and behaviors.

If you are interested in Google Analytics as a tool on your website but would rather not install it yourself, AndiSites can help. We can quickly install Google Analytics for you so you can start checking your reports right away. Contact us today!.

Until next time.

Next Posts to come:

  • How do you track downloads?
  • Why are the numbers for page views different than server-side trackers?
  • Tracking custom variables.

Footnotes:

  1. https://en.wikipedia.org/wiki/Google_Analytics
  2. http://adwords.blogspot.com/2015/12/use-smart-goals-powered-by-google.html
Back to Blog