Anže's Blog

Python, Django, and the Web

16 Feb 2013

Google Analytics should use log scale

Google Analytics is an awesome tool. I have the utmost respect for the googlers working on it every day.

There is a problem though. The graphs look okay if you have regular traffic throughout the month, but if you are a blogger that probably won’t be the case. You will most likely have little to no traffic between blogs and then a huge surge of traffic when you write a new post. Especially if the social web gets a hold of it.

This is exactly what happend to me with my The Chrome Javascript editor can do hot swapping blog post, and this is the resulting graph:

As you can see, pretty much the only thing visible on this graph is the huge spike on the day I published the blog. Traffic on all the other days seems to be zero, with a small exception round 21 Jan when I published another blog. There is no way for me to tell how much traffic the other blog has gotten - somewhere below 2k would be my best guess from glancig at the graph.

The solution to this problem is amazingly simple. You use a logarithmic scale for the vertical axis:

Now I can see everything - even the drop from 20 page views per day to 10. I can now tell exactly how much traffic the second blog post has gotten and the huge 12k spike still seems huge.

The funny thing is that all the chart/graph libraries have the option to use log scale - d3, pylab and even google charts all have it built in. It’s weird that Google Analytics doesn’t provide the option.

Am I the only one who prefers the second graph? Let me know what you think!

Enjoyed the read or have a different perspective?

Let me know on Twitter, Mastodon, or email. 🩵