/ GOOGLE ANALYTICS

How to Setup Google Analytics / Universal Analytics for Your Project

Google Analytics is an amazing tool to collect insights about how your users interact with your website, and it is very easy to get started.

You have started your project, built the best functionality ever, and published the fanciest landing page ever, you are ready for your users. You have only one point missing, you would like to know the analytics about your project to understand how your project is performing and how you can improve it.

What is Google Analytics?

Google Analytics is a platform that makes tracking website metrics very easy. Essentially, it behaves like a tracking collector, which collects a lot of information regarding your website, which then you can convert into different reports depending on your aims. Even though it is not the only analytics solution out there, it is probably the most common free website tracking and analytics solution. It has a clean interface, allows you to interact with your data easily and setting it up is a breeze.

What is Universal Analytics?

Universal Analytics is the next iteration of Google Analytics that is improved in terms of functionality and convenience. Universal Analytics allows you to have better tracking with cross-device and cross-platform usages, more accurate information from all types of devices, built-in enhanced e-commerce integration and a lot of other cool stuff. You can check the basic differences here.

Universal Analytics introduces a set of features that change the way data is collected and organized in your Analytics account, so you can get a better understanding of how users interact with your online content. - Google

Concepts

Google Analytics contains some concepts such as properties, views, reports, tracking code and various additional concepts around website analytics. Even though some of these concepts are only required if you’d like to go deep into different implementations and in detail, some of these concepts would be helpful to understand how Google Analytics works in general.

Account

A Google Analytics account is a free entity where you can use to collect different properties of your project all under the same roof. You can have multiple Google Analytics accounts where you create an account per each project you have, and they are completely free.

A Google Analytics account is a free entity where you can use to collect different properties of your project all under the same roof.

Property

A property is a sub-entity under accounts in Google Analytics. Basically, a property is a logical unit under your account that is supposed to contain a single application mostly. For example, you can set up Google Analytics for your website under one property and mobile application under another property, that completely depends on you. By default, you get to have a default property once you have an account.

A property is a logical unit under your account that is supposed to contain a single application.

Profile (View)

A profile in Google Analytics is a view of your data in your property that is set for a specific business purpose. A view is basically used for filtering your data into separate units in order to make it easy to track and analyze. There will be a profile under your property by default, usually named as “All Website Data”.

A view is basically used for filtering your data into separate units in order to make it easy to track and analyze.

Tracking Code

Google Analytics and all the other analytics platforms require you to place a small piece of code into your application so that the application can communicate with Google Analytics from the users’ device in order to collect the metrics. The tracking code is usually a small JavaScript code that you embed into the beginning of the head of your HTML content, so that it is loaded and executed as soon as the body of the document is loaded.

Tracking code is a small piece of code to allow the application to communicate with Google Analytics from the users’ device in order to collect the metrics.

Creating an Account

You can create your Google Analytics account right now, it is very easy and completely free:

Google Analytics Signup Screen

  1. Click here to go to Google Analytics.
  2. Click “Start for free”.
  3. Log into your Google account, it will create a new Analytics account associated with your account if there is none.
  4. Click “Sign up”.
  5. Fill your account information into the form.
  6. Click “Get Tracking ID”, and that’s it!

At that point, you have set up your free Google Analytics account and ready to use analytics in your website.

Adding Tracking Code

The tracking code is basically a simple JavaScript that utilizes Google Tag Manager in order to collect the tracking information. The code itself is quite simple, and you can grab the code by Going Admin > Account > Property > Tracking Information.

Google Analytics Tracking Code

The tracking code looks something similar to this, of course it will have your property ID:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123456789-2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-123456789-2');
</script>

Once you have copied this tag, you can go ahead and paste it into the beginning of the head section of your HTML page, and that’s it, you are done!

What now?

You have successfully setup your Google Analytics / Universal Analytics integration with your project, and now you can track the stats of your project directly from Google Analytics Dashboard. As soon as the implementation is completed and it is deployed, you are going to be able to track live customers and how your users use your project.

Even though the setup itself was quite easy, having all these information regarding how your project performs can become a daunting task. In order to simplify your reporting and track the progress of your project, you can start using ReportMonkey for free and get your first report in less than a minute.