Adding microanalytics.io to WordPress

For a while I’ve been uncomfortable with using Google Analytics on all my web properties. It’s a simple obvious default and the web is full of advice on how to make the best of it, but there are real privacy concerns with so much of the web’s traffic using one analytics provider. I don’t have any specific concerns about Google’s policies, but I’m naturally suspicious of concentrating the majority of data with any one company, particularly a company with such wide-ranging interests.

The good news is that there are lots of analytics options out there that meet all the needs of small-time publishes, and do it with better privacy awareness and smaller, lighter downloads. This may not meet the needs of marketers who want to optimise their sales pipeline, but if all you want to know is how people arrive at your site and what content they read, Google Analytics is overkill.

I looked at a few analytics options and settled on microanalytics.io. It does everything I need, and the pricing is sensible (free for my level of traffic, $9 a month if it starts to get serious).

Integrating it into WordPress was harder than I expected; I would have thought that any analytics company worth its salt would provide a WordPress plugin. However, it’s hardly difficult if you’re not scared of copying and pasting HTML.

I ended up using the Header and Footer Scripts WordPress plugin, which enables you to inject arbitrary Javascript code into your site. After installing the plugin, I went to the plugin settings and pasted the code provided by Microanalytics into the “footer” section, and everything just worked.