My personal experience is that most users of Google Analytics are only familiar with its standard capabilities, so for them the most common use case of Analytics is to get user and session based statistics. This is not a misconception, basically Analytics provides us time series data of pageview, session and user counts divided by traffic sources, device types and some approximate demographic groups. But Google Analytics is a tool that can provide much, more, and can be a more exciting and comfortable solution for behavior analysis. And I think, at the end of the day, we are all more curious about how our users behave on our platform, how they convert and help us reach our business goals than we are about the simple number of visitors.

Every site owner, developer, marketer, etc. has a preconception about how their users should use their site/application, and everybody has expectations about performance when a new application goes live. So, I assume the main use case of web analytics to help fine-tune our application in order to reach our goals and meet our expectations, should be a data based feedback loop for action. In general, the best tool to use for this is Google Analytics (GA), and the reason for that is not that it is the most innovative, or even the best solution, but that it is the most comfortable. It’s most basic setup can measure every page view with only a few line of codes added to every page of our site, and from that it constructs a data model with three levels, which contain user, session and pageview count metrics in a given date range. Every level contains specific categorical data columns called dimensions, and they can be joined with numerical data columns called metrics. For example: 
For the site’s pageviews and sessions the previous sources are listed. We can measure how many users came from a specific source (Facebook, Google search, direct reach etc.), for how long they are on our site etc.

Metrics and dimensions

In one chart that shows us what GA’s basic setup is capable of, everything described above can be seen in pretty well summarized dashboards in your browser. Besides the basic tables, Google provides some user behaviour graphs, an API for exporting data, and customizable reports in Google Data Studio.

Graphs of behaviour

But I think the aforementioned type of data objects are the so-called vanity metrics, and this article is more about deeper insights. By vanity metrics I mean they only show our users page view counts, which just informs us if people know we exist. These statistics prove that they followed a social media link, so they participated in one of our campaigns, which means we can check GA to see which of our social media sources has high numbers. This can indicate if there are any problems with our solution, for example a high bounce rate (percentage of closed browser windows without any action on the page), but first we need to perform a few more steps to understand the challenges of our site, and that lead us to better understanding of user behavior.

I like to think about web analytics as building measures for our goals and creating datasets that model the context of these measures. So, the most successful tracking strategy is to follow our users from the moment they arrive on our site, and then record their progress at our preliminary checkpoints. We should know if they arrived at the site on a custom landing page or the main page, then if they followed a login page, or a selected an article, if they clicked on a button to order something, or read another article and then just left. The checkpoints to track are all the important actions on our site that visitors can make, which all have value to us, and all the actions we think could influence an, or lead to, a conversion. So, thinking about the order example, the conversion is clearly the buying activity, but before that we need to know the visit counts to the product pages, the logins, the views of the marketing articles, and how a user’s path looked from our landing pages. This data provides the context for the buying activity, the parameters in the dataset can help us differentiate the individual users into groups and understand their behavior aggregately. The equivalent of this type of analysis in GA is event tracking. Events contain three dimensions: a category, an action, and a label, which can be customized.
For example we can measure the specific login attempts. An event can be created for every user login, where we can specify the event’s category (User access), the action (Login, it also could be logout in another scenario), and the label, which is the username.

User access example

To understand events better, I need to mention another Google solution called Tag Manager (GTM), which is middleware between your site and Google Analytics. The GTM also has a data model with three levels, but it runs on the site. It contains tags, triggers and variables. Basically the tag is a special kind of customizable function, which communicates with the Analytics account, and sends data to it. The variables are the lesser elements, which contain relevant data when a tag is used. So, for example, a variable can be a date object, a string, or an HTML element. It can contain every kind of object that can be obtained by JavaScript code from our pages. The triggers are conditions, these fire the tags when a specific event happens, for example a pageview, a click, a scroll, etc. So with GTM, we can easily build a data packet (tag), which contains the type of user interaction that has happened on our site (for example a click on an order button), and send it to our GA account with all the relevant contextual information (the time of the click, the ordered product etc.).

Event tracking enables us to build highly customizable reports and segment our uses into groups. We can add many types of segments to our GA account, which filters the user data by specific conditions. This can help us understand the difference between our valuable and not so valuable users, how they behave on our site, how many of them there are, and try to find ways to increase their numbers.