Integrating CogniDox with Piwik for document analytics

cognidox integrating piwik_blog image

One open-source software technology that’s impressed us recently is Piwik. This is the open-source alternative to Google Analytics (GA). We're not alone on this: as of June 2012 vital statistics were 1 Million downloads and more than 300,000 websites using Piwik for analytics. Does Piwik provide the same features as GA? Is it right for you? Judge it for yourself by watching their promo video on YouTube.

Piwik as an alternative to GA attacks the myth that the main value of the open source is "Free". After all, GA is free for the majority of users unless you sign up for Google Analytics Premium. To someone with the free mind-set, there wouldn't be a case for building the Piwik project.

The important value of open source is "Open". It breaks out into two benefits. The first is we are free to study the code and decide how best to integrate it. In fairness, any good API could achieve the same result, even with closed source software. The other benefit is flexibility (freedom) to deploy in any way required. GA is only available as a hosted service. We could talk about privacy here, and maybe you are "just licensing" your web analytics data to Google (or Yahoo, Facebook, etc.) to use, but are you sure you want to do that? The price for your free service is that you grant expansive usage rights to your data. You can of course opt-out if you know how.

There's a data availability issue too. What if instead of choosing GA you'd opted for Yahoo Web Analytics? From the end of August 2012 your data would be read-only and you're advised to remove the analytics tags from your website. You have only more 2 months to view your "historical data".

All of these are important issues, but many times we act pragmatically and we use the service anyway. The benefits are just too good to ignore.

But the big attraction for us in Piwik is that it can be installed behind the Firewall and dedicated to monitor usage statistics from specific Intranet or Extranet websites. It’s exactly as if you could download the PHP or other code that makes GA work, and use it the way you want to as part of a project.

Book a free demo of the Cognidox Document Management System

We didn’t dwell too long on considering it, but imagine if we set out to re-create all the functionality that a tool such as GA entails. Instead of re-inventing the wheel, the correct approach is to find the best existing open source project that does what you need and then exert your efforts integrating it. The left-over time can be used to improve the open-source code base, and naturally, you contribute this back to the project.

So we’ve written a Piwik tracking plug-in for Cognidox 8.6 that allows Cognidox usage and downloads to be tracked by an intranet Piwik.

How does the Cognidox/Piwik integration work? Let’s say we want to collect analytics (page views, downloads, time on site, etc.) from an internal website that we’ll call cognidox.acme-inc.lan and from a customer-facing site we’ll call Piwik is installed on our web server (so we now have e.g. piwik.acme-inc.lan as a URL).

Configuration requires adding the website names in Piwik and adding the Piwik URL in Cognidox. The plug-in generates a JavaScript tracking code that you cut and paste into a Cognidox file.

Once you’ve done that, the plugin provides very useful functionality. If you're tracking internal usage, you can see the most downloaded files on the site, and perhaps set up a goal for a particular document you want people to view. On the Extranet, tracking the most popular downloads is beneficial along with making sure users are successfully finding content. Tracking the technologies used by clients is also useful so you can determine how to develop the Extranet without locking out users.

To go back to the privacy topic we raised earlier, a major benefit with Piwik is that we can use it to track user logins with downloads; to see if a particular user has downloaded a document. Google’s privacy policy is written for the public Internet and would strictly prevent this, but it is a valid thing to do in a private environment such as an Intranet or Extranet. As you own the data with a self-hosted Piwik system, this is not an issue.

As far as we can tell, this is the first instance of using Piwik with a document management system. Certainly, there are no other DMS examples on the Piwik integration page. That seems strange, given the obvious value to any company of analysing document utilisation, but it appears to be the case.

We’re looking forward to working more with Piwik. If we can help any Cognidox customer to get up to speed quickly with its use, give us a call.


Tags: Document Control, Document Analytics, Open Source Software

Paul Walsh

Written by Paul Walsh

Paul Walsh was one of the founders of Cognidox. After a period as an academic working in user experience (UX) research, Paul started a 25-year career in software development. He's worked for multinational telecom companies (Nortel), two $1B Cambridge companies (Ionica, Virata), and co-founded a couple of startup companies. His experience includes network management software, embedded software on silicon, enterprise software, and cloud computing.