Piwik or Google Analytics? Pros and Cons of Web Analytics Tools

Home » SEO » Piwik or Google Analytics?

Web Analytics Tools: Piwik and Google Analytics

Matomo (matomo.org – formerly Piwik) and Google Analytics both are traditional web analytics tools that you can use on your website.

  • The tools track the behavior of users while they are using your website.
  • The collected data can be made available to you through the readily built-in reports in their user interface.
  • From the reports, normally you will be able to view many high-level trends of your users when they visited your website.


  • Do not ever expect your web analytics tools to tell you any business insights from the data.
  • Do not expect your tools to provide any “call-to-actions” for improving the user experience or purchase conversion rate of your website.

The topics in this article include:

200+ Free Traffic Sources – The Complete List
Promote Your Website with Free Traffic
Get the Complete List as a PDF Document

JavaScript-based Tracking

Both tools track data through web page level JavaScript tracking codes.

A typical Google Analytics tracking code (i.e. Universal Analytics) looks like:

    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    ga('create', 'UA-XXXXXXXX-Y', 'auto');
    ga('send', 'pageview');

A typical Piwik tracking code looks like:

<script type="text/javascript">
    var _paq = _paq || [];
    (function() {
      var u="//{$PIWIK_URL}/";
       _paq.push(['setSiteId', {$IDSITE}]);
       _paq.push(['setTrackerUrl', u+'piwik.php']);
     	_paq.push(['setCookieDomain', '*.example.com']);
     	_paq.push(['setDomains', ["*.hostname1.com", "hostname2.com"]]);
       var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
       g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);

Piwik vs. Google Analytics: Open Source (free) vs. Google (free)

Technically, both tools are free.

  • Piwik is a open source and free.
  • Google Analytics is made available by Google for free. Google does provide a premium version of Google Analytics in which you are required to pay to use it.

Data Extraction: User Interface vs. Full Data Export

Google Analytics does provide a user interface. From the user interface, you are able to extract reports, or do some limited data segmentation (if options are available, such as Google Analytics Advanced Segmentation). Google Analytics end users mostly rely on getting reports from the user interface.

Google Analytics have made many more reports available than most/all other open source analytics tools could. Also, the reports are visually much more beautiful and user-friendly than those from open source analytics tools (e.g. Piwik).

With Google Analytics it is possible to use the official APIs when extracting the data, but it will be highly difficult to export the entire data. Without the full data, it hinders you from doing the more complex and detailed data analysis.

With Piwik, end users can extract reports from the interface, but the readily built-in reports are limited in numbers and user-friendliness.

Due to how Piwik (or most open source analytics tools) were setup in the first place, end users actually have a second option to extract the reports. You can extract the raw data directly from Piwik’s database, and subsequently convert the raw data into reports with additional processing. With the full data available to you, you will be able to re-arrange them in many different ways that will suit you when analyzing complicated and detailed data.

Sampled Data Issues

To get to the detailed data through, you will almost always have to segment your data. With the interface of Google Analytics, you can segment through two ways:

  • Advanced Sgmentation
  • Custom reports

Another issue almost immediately follows with segmenting data. In those Google Analytics reports in which segments have been applied, they almost often end up showing “sampled data”.


In several years I have gone through (and reviewed) more than 100 Google Analytics accounts which range from small to large sizes. Over 90% of the reports when advance segmentation or custom report segmenting were applied, they returned with “sampled data”.

As a result with Google Analytics, you can trust the high-level data trends. But when you get to detailed analysis, most of the times you cannot move forward.

Owning, Storing, and Processing the Data

With Google Analytics, the storage of data and the processing of reports have been taken care of by Google. But you can never own the full data.

You do not have the “sampled data” issue with Piwik, as you own the entire data.

From my previous extensive experience with Piwik while setting up tracking for websites, extracting data, and building reports, all required spending some additional time and effort. The Piwik database that are holding the actual data may need to be backed up. Even in the first place, a reliable storage such as an online cloud solution / service or a server machine must be used. But if that is what your business requires, then this seems the only obvious option.

Web Analytics / Google Analytics

Articles on Traffic & SEO Topics