Web log analytics feature image

What is Web Log Analytics and Why You Should Use It

Contents

Can’t use JavaScript tracking on your website? Need a more secure and privacy-friendly way to understand your website visitors? Web log analytics is your answer. This method pulls data directly from your server logs, offering a secure and privacy-respecting alternative.  

In this blog, we cover what web log analytics is, how it compares to JavaScript tracking, who it is best suited for, and why it might be the right choice for you. 

What are server logs? 

Before diving in, let’s start with the basics: What are server logs? Think of your web server as a diary that notes every visit to your website. Each time someone visits, the server records details like: 

  • User agent: Information about the visitor’s browser and operating system. 
  • Timestamp: The exact time the request was made. 
  • Requested URL: The specific page or resource the visitor requested. 

These “diary entries” are called server logs, and they provide a detailed record of all interactions with your website. 

Server log example 

Here’s what a server log looks like: 

192.XXX.X.X – – [24/Jun/2024:14:32:01 +0000] “GET /index.html HTTP/1.1” 200 1024 “https://www.example.com/referrer.html” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

192.XXX.X.X – – [24/Jun/2024:14:32:02 +0000] “GET /style.css HTTP/1.1” 200 3456 “https://www.example.com/index.html” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

192.XXX.X.X – – [24/Jun/2024:14:32:03 +0000] “GET /script.js HTTP/1.1” 200 7890 “https://www.example.com/index.html” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

192.XXX.X.X – – [24/Jun/2024:14:32:04 +0000] “GET /images/logo.png HTTP/1.1” 200 1234 “https://www.example.com/index.html” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 

Breakdown of the log entry 

Each line in the server log represents a single request made by a visitor to your website. Here’s a detailed breakdown of what each part means: 

  • IP Address: 192.XXX.X.X 
    • This is the IP address of the visitor’s device. 
  • User Identifier: – – 
    • These fields are typically used for user identification and authentication, which are not applicable here, hence the hyphens. 
  • Timestamp: [24/Jun/2024:14:32:01 +0000] 
      • The date and time of the request, including the timezone. 
  • Request Line: “GET /index.html HTTP/1.1” 
    • The request method (GET), the requested resource (/index.html), and the HTTP version (HTTP/1.1). 
  • Response Code: 200 
    • The HTTP status code indicates the result of the request (200 means OK). 
  • Response Size: 1024 
    • The size of the response in bytes. 
  • Referrer:https://www.example.com/referrer.html 
    • The URL of the referring page that led the visitor to the current page. 
  • User Agent: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” 
    • Information about the visitor’s browser and operating system. 

In the example above, there are multiple log entries for different resources (HTML page, CSS file, JavaScript file, and an image). This shows that when a visitor loads a webpage, multiple requests are made to load all the necessary resources. 

What is web log analytics? 

Web log analytics is one of many methods for tracking visitors to your site.  

Web log analytics is the process of analysing server log files to track and understand website visitors. Unlike traditional methods that use JavaScript tracking codes embedded in web pages, web log analytics pulls data directly from these server logs. 

How it works: 

  1. Visitor request: A visitor’s browser requests your website. 
  2. Server logging: The server logs the request details. 
  3. Analysis: These logs are analysed to extract useful information about your visitors and their activities. 

Web log analytics vs. JavaScript tracking 

JavaScript tracking 

JavaScript tracking is the most common method used to track website visitors. It involves embedding a JavaScript code snippet into your web pages. This code collects data on visitor interactions and sends it to a web analytics platform. 

Web log analytics vs JavaScript tracking

Differences and benefits:

Privacy: 

  • Web log analytics: Since it doesn’t require embedding tracking codes, it is considered less intrusive and helps maintain higher privacy standards. 
  • JavaScript tracking: Embeds tracking codes directly on your website, which can be more invasive and raise privacy concerns. 

Ease of setup: 

  • Web log analytics: No need to modify your website’s code. All you need is access to your server logs. 
  • JavaScript tracking: Requires adding tracking code on your web pages. This is generally an easier setup process.  

Data collection: 

  • Web log analytics: Contain requests of users with adblockers (ghostery, adblock, adblock plus, privacy badger, etc.) sometimes making it more accurate. However, it may miss certain interactive elements like screen resolution or user events. It may also over-report data.  
  • JavaScript tracking: Can collect a wide range of data, including Custom dimensions, Ecommerce tracking, Heatmaps, Session recordings, Media and Form analytics, etc. 

Why choose web log analytics? 

Enhanced privacy 

Avoiding embedded tracking codes means there’s no JavaScript running on your visitors’ browsers. This significantly reduces the risk of data leakage and enhances overall privacy. 

Comprehensive data collection 

It isn’t affected by ad blockers or browser tracking protections, ensuring you capture more complete and accurate data about your visitors. 

Historical data analysis 

You can import and analyse historical log files, giving you insights into long-term visitor behaviour and trends. 

Simple setup 

Since it relies on server logs, there’s no need to alter your website’s code. This makes setup straightforward and minimises potential technical issues. 

Who should use web log analytics? 

Web log analytics is particularly suited for businesses that prioritise data privacy and security.

Organisations that handle sensitive data, such as banks, healthcare providers, and government agencies, can benefit from the enhanced privacy.  

By avoiding JavaScript tracking, these entities minimise data exposure and comply with strict privacy regulations like Sarbanes Oxley and PCI. 

Why use Matomo for web log analytics? 

Matomo stands out as a top choice for web log analytics because it prioritises privacy and data ownership

Screenshot example of the Matomo dashboard

Here’s why: 

  • Complete data control: You own all your data, so you don’t have to worry about third-party access. 
  • IP anonymisation: Matomo anonymises IP addresses to further protect user privacy. 
  • Bot filtering: Automatically excludes bots from your reports, ensuring you get accurate data. 
  • Simple migration: You can easily switch from other tools like AWStats by importing your historical logs into Matomo. 
  • Server log recognition: Recognises most server log formats (Apache, Nginx, IIS, etc.). 

Start using web log analytics 

Web log analytics offers a secure, privacy-focused alternative to traditional JavaScript tracking methods. By analysing server logs, you get valuable insights into your website traffic while maintaining high privacy standards.  

If you’re serious about privacy and want reliable data, give Matomo’s web log analytics a try.  

Start your 21-day free trial now. No credit card required. 

Enjoyed this post?
Join the 160,000+ subscribers who receive the Matomo Newsletter straight to their inbox every month
Get started with Matomo

A powerful web analytics platform that gives you and your business 100% data ownership and user privacy protection.

No credit card required.

Free forever.

Get started with Matomo

A powerful web analytics platform that gives you and your business 100% data ownership and user privacy protection.

No credit card required.

Free forever.