Display Web Traffic on a World Map

Programming Snapshot – Mapping Web Traffic

© Photo by Joey Kyber on Unsplash_Traffic.jpg

© Photo by Joey Kyber on Unsplash_Traffic.jpg

Article from Issue 306/2026
Author(s):

To discover where the traffic to his website comes from, Mike Schilli displays it live on an interactive world map.

As soon as I publish a new edition of my USA blog and send out a mass email to my readers, I tend to stare intently at the web server's logfile (Figure 1). This is because I want to see where the traffic is coming from. Instead of looking at long lines of Apache logs, though, I prefer to rest my tired eyes on the colorful graphic in Figure 2. It shows me from which countries people are looking at the current issue in real time on a world map.

Figure 1: The web server records the IP addresses of incoming requests in the logfile.
Figure 2: An interactive world map provides live data in the browser.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Download Article PDF now with Express Checkout
Price $2.95
(incl. VAT)

Buy Linux Magazine

Related content

  • Who's There?

    Rather than using Google Analytics to geolocate visitors to his website, Mike Schilli uses a simple terminal program in Go for a live-tracking session.

  • Data Retention

    To see when clients are joining and leaving the wireless network, Mike Schilli writes a command-line utility that uses an object-relational mapping interface to store metrics in SQLite to later display historical data.

  • Wanderlust

    For running statistics on his recorded hiking trails, Mike Schilli turns to Go to extract the GPS data while relying on plotters and APIs for a bit of geoanalysis.

  • Programming Snapshot – Go Network Diagnostics

    Why is the WiFi not working? Instead of always typing the same steps to diagnose the problem, Mike Schilli writes a tool in Go that puts the wireless network through its paces and helps isolate the cause.

  • Fast as Lightning

    The WebSocket protocol helps browsers to immediately reload a page if the server-side content changes. In this month's column, Mike Schilli whips up his own WebSocket server in Go for this task.

comments powered by Disqus