Tag Archive for ‘Piwik’

Hacking Mint to Recognize Modern Operating Systems

Despite Shaun Inman’s announcement late last year that he was suspending sales and support for Mint, I’ve continued to use the software to track visitor statistics on Initial Charge. In the eight years since I first installed Mint on my server, I haven’t found anything that offers the same level of simplicity, clean design, and overall peace of mind about where my stats data is stored.

I’ll continue to keep my eye out for alternatives, but nothing’s unseated Mint yet. Piwik and Tiny Stats came close. But no one I know that has tried Piwik has stuck with it and when I tried Tiny Stats, I ran across a few bugs that soured the experience for me. I’ll probably move to something new eventually, but I don’t foresee that happening anytime soon.

UserAgent 007 on iPhone

With my continued use of Mint, there is one bit of code that will have to be updated regularly — the list of recognized operating systems in the User Agent 007 pepper. For those who are unfamiliar with Mint, the software has support for plugins, called “Pepper”, that can enhance the core software’s features. User Agent 007 keeps track of what browser and operating systems your visitors are using, as well as the display resolution and whether or not they have Flash installed (which is far less useful in 2017 than it was in 2007).

In order for UserAgent 007 to recognize operating systems newer than Windows 8 and Mountain Lion — which were added in the last update — you’ll have to edit the class.php file located in mint/pepper/shauninman/useragent007/. I highly suggest making a backup of this file just in case something goes wrong.

Windows Versions Array in UserAgent 007

Within class.php, you’ll want to look for an array that tells Mint how to determine what version of Windows the visitor is using. If you’ve never edited this file before, the top entry in the array should be Windows 8. To add support for Windows 8.1 and Windows 10, simply add the following two items above the Windows NT 6.2 entry, just as I’ve done in the image above.

'Windows NT 10.0' => '10',
'Windows NT 6.3' => '8.1',

macOS Versions Array in UserAgent 007

Scrolling down a bit further within class.php, you should find an array with versions of macOS listed. The last one should be Mountain Lion. To add support for newer versions of macOS, be sure to add a comma after the Mountain Lion entry and add the following five items, just as I’ve done in the image above.

'10.9' => 'Mavericks',
'10.10' => 'Yosemite',
'10.11' => 'El Capitan',
'10.12' => 'Sierra',
'10.13' => 'High Sierra'

Unfortunately, this doesn’t retroactively change the statistics that have already been recorded. But eventually, the “Unknown” listing will be replaced in your short-term platform stats with properly identified operating system names. And without officially released updates to the UserAgent 007 pepper, as long as you’re still using Mint, this process will have to be repeated as new operating systems are released with the correct version number and OS name. But this will certainly add some longevity to Mint for us users who aren’t ready to move on just yet.

Dr. Drang Tests Piwik ➝

Dr. Drang:

I’m going to keep running both analytics tools for a while to see if these early results stand up over time, but I’m encouraged so far. And this may turn out to be more than just a conscience assuager. If Safari’s new content blocking leads to extensions that prevent Google Analytics from working—and those extensions become popular—self-hosted tools like Piwik may become the only game in town.

I still haven’t taken the time to install Piwik, but now that I no longer have a t-shirt project to get off the ground I’ll be able to dedicate some time towards it.

Considering Piwik

Nick Heer, on his decision to install Piwik on Pixel Envy:

I want you to know that I’m taking Piwik for a trial run. Piwik is analytics software that is self-hosted, so none of your information is going to a giant advertising company. I’ve long been an ardent supporter and user of Mint, but it hasn’t been updated for a while so it’s not super great at reporting recent versions of iOS and OS X, for example.

I had never heard of Piwik until John Gruber started a discussion on Twitter over the weekend about whether or not Google Analytics was a privacy-invasive tracker. I saw several responses that suggested he take a look at Piwik, a freely available, open source analytics package that can be installed on your own server or hosted by their cloud service.

I replied to John pointing out his own policy regarding Google Analytics on his Markdown Dingus — preferring not to have analytics tracking to ensure its users that Google couldn’t read what they were inputting into the text field. I also noted that I observed in Ghostery that Google Analytics was loading a tracking script from Adometry on Daring Fireball.

Adometry, as far as I can tell, is a company owned by Google which helps Adsense properly attribute revenue to the sites which contribute to a successful advertisement conversion. I also observed DoubleClick trackers appear on sites like The Loop, which I can also only assume are being loaded because of their use of Google Analytics. I prefer not to be tracked at all, but I’d certainly consider Google Analytics to be a privacy-invasive tracker when it’s sending my data to ad-related services even when I visit webpages that don’t include Google-served ads.

I haven’t used Google Analytics in years because I was always concerned that they were using the collected traffic data for more than just the betterment of the sites who use it. But until this weekend, I never really had any proof of it. I have been using Shaun Inman’s Mint, which I still consider to be a great analytics system. But as Nick points out, Mint hasn’t been updated in quite sometime and I’m starting to wonder if I should switch to an analytics app that’s more actively developed.

There’s a lot to like about Piwik — there’s a native iOS app, it respects Do Not Track, and I’ve noticed others deciding to test it as well (Ben Brooks being one of them). But I’m not jumping in just yet, I’d like to see how Piwik works out for Nick and Ben first and I’m not sure if Piwik tracks RSS subscribers like Mint does with the Bird Feeder pepper. This means I might have to find an alternative solution if I want to switch to Piwik while continuing to keep tabs on the number of RSS subscribers to Initial Charge.

Piwik might not be the best option for every site — there’s plenty of other options if you look around. But those of us who run websites owe it to our readers to not give up their browsing information to third-parties so easily, particularly when it’s not happening transparently. At least you have some idea of what’s happening when you visit a page that displays Adsense ads, but that isn’t the case when you visit a site that simply uses Google Analytics.

I would especially like to see John Gruber move Daring Fireball away from Google Analytics. He sparked this whole conversation to begin with and is someone who cares deeply about treating his readers with respect. And I think the respectful thing to do would be to stop sending his reader’s browsing data to third-party, ad-related tracking services like Adometry.