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:Ā
- Visitor request: A visitorās browser requests your website.Ā
- Server logging: The server logs the request details.Ā
- 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.Ā
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
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.Ā
Try Matomo for Free
21 day free trial. No credit card required.