photo shows connections of network devices

Google Analytics Technology

Google Analytics Technology 700 460 Nicola Lapenta

How the most used Data Analytics platform in the world works.

Content index:

Introduction

Google Analytics is a free web analytics service provided by Google that allows you to analyze detailed statistics of visitors to a website. It is the most used statistics service on the web, with a world market share of 84.1% (data of 22/01/2021 source w3techs.com).

It is used to observe various types of traffic statistics of a site: such as the duration of the session, the origin of the visit, the number of pages visited, the most viewed pages or the geographical location of the user’s origin. It can be used to analyze Google Ads online campaigns or to monitor the quality of the pages and to know the useful information to transform a user’s visit into a goal. These goals can include sales, lead generation, specific page views, or the download of a specific file.

This article aims to deepen the functioning of the basic components of the Google Analytics platform that allow tracking and data analysis with a Javascript tracking code. If you want to learn more about the history of this platform, read the article Generations Google Analytics.

How it works

Google Analytics is implemented by adding a tracking code called GATC (Google Analytics Tracking Code) written with JavaScript language that the user adds to all pages of their web domain. This is known as JavaScript coding or Tagging.

This code, which communicates directly with the Google server, allows the collection of users’ browsing data, which are then processed, developed and shown within the platform.

To work, the GATC loads a large JavaScript file from Google’s server and then sets variables with the user’s account number. This file has an average size of 18 KB and needs to be downloaded only once, at the beginning of the visit, and this makes it probably one of the most downloaded files in the world. In figure 1 an example of Google Universal Analytics JavaScript code.

javascript code of Google Universal Analytics example
Figure 1 Tagging JavaScript Google Universal Analytics

In addition to transmitting information to the Google server, the GATC sets first party cookies on each visitor’s computer. This allows you to store anonymous information such as the type of visitor (new or returning), the duration of the visit and the source of origin of the visit (direct, organic or from a referring site).

JavaScript tagging is the data collection method used by most web analytics platforms. The diagram below in figure 2 describes the entire coding process in steps:

photo operation flow of javascript tagging
Figure 2 Operation Flow Tagging Javascript
  1. The customer types in a URL from a browser.
  2. The request arrives at the web server.
  3. The web server returns the page along with a JavaScript code snippet added to the page.
  4. When the page loads, the JavaScript code is executed, which captures the page view and details about the visitor’s session and cookies and sends it back to the data collection server.
  5. The server collects and manages the data set. In some cases the same server responds to the browser with additional cookies or the request to collect more data.

Some Analytics platforms have solutions that store the acquired data directly within the customer’s servers. This, in addition to facilitating integration with other flows within the company, allows you to have complete ownership of the data collected.

Advantages

The big advantage of this data collection technology is that the acquisition phase is separate from the analysis phase, thus reducing the dependence on corporate IT departments for different data acquisition requests.

Company servers, without the need to also acquire data, can publish web pages. The data on the visitor’s session are acquired and processed on other third-party servers with reports available online.

Therefore, it is no longer necessary for companies to host the systems to collect data and the people of the team that deals with analysis and reporting in their infrastructure.

Other benefits of using JavaScript encoding as a data collection mechanism:

  • Ease of Implementation: Adding a few standard lines of JavaScript code to the pages of a site can instantly map the entire site and you can manage huge amounts of data and reports even after just 30 minutes.
  • This data collection method is particularly interesting for small and medium-sized enterprises that do not have access to the web server log files (all events including all the detailed information of a process or service are recorded in a log file).
  • The use of third-party cookies for monitoring users on multiple domains becomes easier, because the third-party cookie and its identifying elements remain consistent.
  • You get great control over the choice of data that is collected: in fact, you have the ability to implement custom tags that allow you to acquire additional data for the pages of interest.

For example in the case of an e-commerce:

  • shopping cart;
  • checkout;
  • order confirmation;
  • order value;
  • most viewed product;
  • most purchased products.

Disadvantages

As with all technologies, data collection also has some disadvantages, the main ones are listed below:

  • Data ownership is not unique.
  • Some visitors to a private website do not enable JavaScript tracking, so for these users, your analytics platform will not collect any data and visitors will be completely invisible.
  • Regular site maintenance is essential to create and manage tags accurately in order to respect the site’s taxonomy.
  • JavaScript tags collect “browser side” and not “server side” data. Some websites, instead of storing some data in cookies or URL parameters. Will store data on servers during the visitor’s session. In this case, the tags will not acquire the essential data.
  • In some cases, the use of JavaScript tags may cause conflicts in the functioning of the analyzed website.

Conclusions

As described above, activating data analysis with the Google Analytics platform has many operational and implementation advantages. Since data collection cannot be retroactive to configuration, it is advisable to activate it as soon as possible in order to accumulate as much information as possible on the traffic of digital channels that would otherwise be lost.

Over the years, the JavaScript code for data monitoring has evolved to allow for the addition of new features. To learn more about all the advantages of the new GA4 version, read the article Google Universal Analytics vs GA4.

Autor: Nicola Lapenta

Credits:  Official Blog Google Analytics products  Official Blog Google Marketing Platform, Google Marketing Platform , Google SupportWikipedia, Blog Avinash Kaushik, w3techs.

Photo by Massimo Botturi on Unsplash.

visualizzazione di infografiche data analytics da scaricare


    By clicking on the "Submit request" button, I accept the information on Privacy Policy present on the site.