web logs analyzers vs JavaScript web analytics - Flat 101

Log-based and JavaScript-based web analytics, pros and contras

If I look back at the end of the 90s, when I started work in this delightful web/digital sector, I already used web analytics without being aware of it (because the term “web analytics” was not in use), by regularly consulting tools such as Webalizer (my favourite) or…

If I look back at the end of the 90s, when I started work in this delightful web/digital sector, I already used web analytics without being aware of it (because the term “web analytics” was not in use), by regularly consulting tools such as Webalizer (my favourite) or AWStats. They were primitive in terms of graphics, but they provided valuable information on access to websites. They were tools for showing the data from the server log where the website was hosted. Basic data, but data nonetheless.

In the early 2000s I came across Urchin, a more powerful web analytics tool with greater capacity than Webalizer or AWStats. Google bought Urchin in 2005 to create what we now know as Google Analytics, which launched at the end of 2005. I spent an inordinate amount of time working with Google Analytics in 2006, but also with tools such as AWStats and Webalizer, and I was always asked the same question in the companies that used them, “Ricardo, why does Google Analytics give me some visits, and AWStats give me others? Which is correct?The answer is easy enough. They are both right.

This tale of the good old days is intended to outline the difference between web analytics tools based on logs (AWStats) and those based on JavaScript (Google Analytics).

Today there are many tools available for web/digital analytics which use both systems of measurement, based on logs and JavaScript.

What do the log-based web analytics tools actually measure?

Log file preview

Easy. As the drawing at the top of this post shows, log-based web analytics tools gather information on log activity and display it as a graph or structures in data tables. A log file is a file generated by a server that contains a register of all requests (called hits) that it receives. Literally all requests, which means any type of file that forms part of data group that is required in order to “see” a website, and not just HTML files. The data received is stored anonymously with details such as the time and date of the request, the IP that sent it, the URL requested and browser’s user-agent.

Image of a log file. This is how good it looks

In basic terms, a log is a register of a server’s activity, so web analytics tools based on this system will show data about the files and requests that are sent to the host.

OK, so what do the JavaScript-based web analytics tools measure?

Here is one simple way to explain the basics of how JavaScript-based web analytics work
Here is one simple way to explain the basics of how JavaScript-based web analytics work

This block has the most popular tools on the market, headed by Google Analytics. Unlike log-based tools, which extract information from the log file, JavaScript-based tools work by the insertion of a small fragment of JavaScript in each of the HTML documents that make up our website, either directly or through tag manager. Every time a user requests a URL where this JavaScript is present, the data from the user’s browser header are collected in a cookie, sent to the Google servers (in the case of Analytics) and processed to be presented in a graphic panel, as our friend Google Analytics.

An example of classic Google Analytics code working on a website
An example of classic Google Analytics code working on a website

In short, they are tools that interpret the data from the user’s browser header, and they all use these same basic elements: URLs, cookies and JavaScript.

So they all measure the same thing, right?

No, no they don’t. A log-based web analytics tool has data on the requests that are sent to the machine, the server which hosts the website. A JavaScript-based web analytics tool offers data based on the browser headers of the users who have accessed the website and where the URL-JavaScript-cookie cycle has been completed to collect this information.

So what is the difference? I don’t get it.

Easy. A log-based web analytics tool will tell you, for example, that the home URL of a website has been requested 400 times. Over the same period, a JavaScript-based tool will tell you that this same URL has been requested 300 times. What does this difference mean? Easy. The log processes requests, as we have already seen, regardless of whether they come from users, bots or browser systems that do not use JavaScript or cookies. On the other hand, tools like Google Analytics only offer data that can be captured by this URL-JavaScript-cookie triad. If any of these elements fails or is absent, the visit is not counted.

Pros and cons of log-based and JavaScript-based web analytics.

First of all, it must be said that these measuring systems do not replace, but supplement each other. They do not measure the same thing, so they complement each other, and should be used depending on the type of information that we need at any specific time, the problem we want to address or the inefficiency we want to remedy.

Log-based web analytics tools will not provide valuable information about, for example:

  • Bots visiting our site
  • Requests for files “hanging” from our website, like PDFs or documents.
  • Errors on the site linked to HTTP Status.
  • Technical details about access to the website: IPs, etc.
  • Especially when the data can be reprocessed as many times as we want, because it is 100% raw.
 As the image shows, a simple log-based web analytics system such as AWStats collects all the requests from bots from the browsers that have taken place.

As the image shows, a simple log-based web analytics system such as AWStats collects all the requests from bots from the browsers that have taken place.

In contrast, the JavaScript-based web analytics is easier to use, very flexible as a tool, and has a relatively fast learning curve, making it easy for the user to understand. It is, to put it one way, a form of web analytics for “normal” folk, people without technical training.

Having said that, it should be clear that both systems can and should co-exist and be used depending on the needs that the growth of a digital project might have. This is the best approach, because a single measurement system is a mistake as it only offers us a partial view of the website.

In fact, if I had to choose only one system to use for measurement, I would probably choose the logs; which are harder to use but much more reliable overall. We have both approaches, though, so why should we choose?



Leave a Reply

Your email address will not be published. Required fields are marked *

Últimos artículos publicados
News
5 min
Por Mercedes Gómez
17 May, 2018
Web Analytics / Digital
3 min
Por Flat 101
10 October, 2017
News
4 min
Por Flat 101
27 September, 2017
Development
4 min
Por Sandra Navarro
21 February, 2017
News
2 min
Por Miguel Ángel Vallés
31 October, 2016
Web Design and UX
7 min
Por Sandra Navarro
23 June, 2016

If you need development specialists to develop or improve your digital business, we can help you.

  • The data provided to us by the user through this form will be included in the data processing whose responsible is FLAT 101 S.L. with CIF B99393613 and registered office at Avda. Maria Zambrano, nº 31, Edif. WTCZ, Torre Oeste, 12D, 50018 de Zaragoza. You can contact us by calling 976419856 or by e-mail at info@flat101.es. The purpose of collecting data on this form is to be able to answer the queries raised and send the user the information requested via the email or telephone indicated on the form. Data will only be transferred if there is a legal obligation to do so. Your rights to access, rectify and delete, as well as other rights, are reserved, as indicated in the Privacy Policy.