2015-02-27

Your Piwik reports state that you had 35,292 Visits last month whereas your other analytics tool states that you had 27,540 Visits. Why the big difference? Where do these data discrepancies come from?

If you are using Piwik and another analytics platform to source your stats, you may at some point notice a slight or even a big difference between the data reported by each of these tools. In this post, we will explore some of the possible reasons for data discrepancies and look at what can be done to solve this problem.

First of all, it’s important to note that there will always be about a 5% discrepancy between various analytics platforms and this number is considered acceptable. Anything more than that will require a small investigation to discover the causes of such a big discrepancy. In most cases, there won’t be one reason for the difference, but rather many different reasons.

Before we look at some of the more complex possible causes, let’s try and eliminate the main obvious cause:

Not Placing the Tracking Code on Every Page

This might seem like an extremely obvious one, but it can sometimes be overlooked. If you are using Piwik and another analytics platform, then you will need to ensure that both the Piwik tracking code and the tracking code from the other platform are placed on all the same pages. If this is not done, then your reports will show completely different numbers.

Now it’s time dig a bit deeper! We will now have a look at some of the more complex possible causes of organic data discrepancies.

Comparing apples and oranges

Users often compare different metrics such as clicks in AdWords to visits in Piwik, or actions in Piwik to pageviews in other platforms, etc. You need to make sure that you compare the right metrics in the first place to ensure accurate reporting.

The best place to start is to compare the data from pageviews. This is a universal metric that should match within the reasonable 5% threshold between different analytics platforms, regardless of how they handle more complex metrics such as unique visitors/devices, real users or sessions (visits).

Do Not Track (DNT)

This is a header that users can active on their web browser so that the web sites they visit and use will not track them and their activity. All of the most popular and modern browsers support this function, but users have to activate it manually. The only exception is Internet Explorer, which has the DNT function turned on by default.

How can it affect the data reports?

If a user has activated this DNT option on their web browser, then by default Piwik will respect this decision and therefore won’t collect data from this user. Most other analytics platforms will still collect the user’s data, even if the user has activated DNT. The latest information about Google Analytics (GA) suggests that it DOES collect the user’s data, even if the user has activated DNT. It is worth checking to see if the other analytics platform you are using respects DNT or not.

Possible solution:

You can change the default setting in Piwik which will then allow your Piwik service to ignore this DNT option. The steps for doing this are as follows:

1. Open your Piwik settings by click on your username in the top right corner of the Piwik dashboard and choose Settings from the drop-down menu

2. Open the Privacy section. It is located in the menu on the left-hand side

3. Click › Disable Do Not Track support (not recommended)



Unique Visitor Calculation for Custom Period

A Unique Visitor is someone who has already visited your website. In order to register a Unique Visitor, Piwik has to calculate the unique occurrences of the particular ID within a set period (i.e. a given day, week, month or custom date range). As this is a very compute-intensive query, Piwik calculates it only for fixed periods – day, week and month. It doesn’t calculate it by default for year and custom date ranges.

When you select daily unique visitors and aggregate them, or a custom date range, please note that the aggregation of daily unique visitors and Unique Visitors for given period are totally different metrics. The latter will be always smaller because a single visitor can visit the site multiple times during the whole period (in this case, 1 month). When aggregating the daily unique visitors, you count the same visitor a couple of times.

Possible solution:

Use with caution – calculate the unique visitors for custom date ranges. For high-volume sites this needs to be pre-calculated.

For more help regarding this, consider registering for a Piwik Cloud account or purchasing a Piwik Enterprise support plan. Both options include support from Piwik experts that can assist you in solving this issue.

Trust cookies or fingerprints?

By default, Piwik computes a fingerprint of a device based on the IP address, browser and OS versions, browser installed plugins, (and a few more other areas) and uses this as a unique identifier of the Visit (session). In the case of strict corporate/intranet environments where all the computers have the same configuration, this may lead to “merging” several sessions (Visits) together and actions from several users may appear under one visit.

One of the symptoms of this problem is a very high average number of actions per visit.

Possible solution:

Turn on the trust first-party cookies option in the Piwik config, so that Piwik does not use the fingerprint, but the first-party cookie.

Here are the steps to do that:

1. Open the config.ini.php file – it is located in your piwik/config folder

2. Add the following lines to this file and save it.


Note: this should only be done in the intranet environment.

Visit length

How can it affect the data reports?

By default, Piwik records a new Visit from the time a user accesses your site, as long as that time is greater than the selected time of inactivity. For example, let’s imagine your Piwik’s time of inactivity is set at 30 minutes. If a user accesses your website, surfs a few pages, walks away from their computer, returns 30 minutes or more later and starts using your website again, then they will be counted as a Unique Visitor twice and 2 sessions (Visits) will be recorded for that user. The default setting of ‘30 minutes of inactivity’ is pretty standard across most analytics platforms. However, if these minutes of inactivity are different across your analytics tools, then the numbers will also be different. Imagine that on one analytics platform you have the ‘minutes of inactivity’ set at 30 minutes, and on the other platform you have it set at 5 minutes, then this will surely cause your data to be different.

Possible solution:

Check the Visit length setting in both of your analytics platforms and see if the minutes of inactivity are the same. If they are not, then you will need to change and align them so that they match.

To do this in Piwik, simply follow the steps below –

1. Open the config.ini.php file. It is located in your piwik/config folder

2. Add following lines to this file and save it.


Blocking certain users (IP addresses)

Blocking certain users based on their IP address is another way to report accurate users (i.e seeing real users rather than seeing yourself as unique visitor 100 times a day). For example, you might choose to block the IP addresses that are assigned to your home and work computer, the computers in your office, the computer you use for application testing, etc.

How can it affect the data reports?

If you have some computers (IP addresses) blocked on one analytics platform and not the other, then this will cause your numbers to be off. In some cases, even if your analytics platforms are not blocking the same IP addresses, this might not cause such a big difference. However, in other cases where the number of non-actual users is much higher, then this will have a big impact on the data. Think of a medium- to large-sized company that employs 50 staff. If the staff’s IP addresses are not getting blocked and if each staff member access the company’s website 20 times a day, that will give you at least a difference of 1000 Unique Visitors. Either way, to ensure that you are getting the most accurate numbers, you should make sure that both analytics systems block the same IP addresses.

Possible solution:

The first thing you will need to do is find out which IP addresses are being blocked by both analytics platforms, then change and align them so that they match. The steps for doing in Piwik are below –

From your Piwik Dashboard:

1.Open Piwik settings by clicking on your username in the top right corner of the Piwik dashboard and choose Settings from the drop-down menu

2. Open the Websites section – it is located in the menu on the left-hand side

3. Either add the IP addresses that you wish to exclude to the Global list of Excluded IPs or add the addresses to the particular websites (EXCLUDED IPS)

JavaScript error

Data discrepancies can also be caused by issues relating to the tracking codes. The problem could be as simple as not having the tracking code placed on a certain page, or it might be that the settings are different and need to be changed.

To debug this problem, you can use tools like Firebug or Webinspector and see if the requests are sent to the tracker (in the case of Piwik, it will be a request to yourpiwikserver.com/piwik.php).

Another source of the problems may be multiple Piwik trackers installed on the same page which may send the data to the wrong website profile, leading to under- or over-reporting in the respective profiles.

To read about the solution to this issue, please click here.

Campaign data

You will often see data discrepancies between the traffic received on your website vs traffic sent by your advertising vendor (ie DoubleClick, AdWords, AppNexus etc.).

First of all, let’s understand the difference between the metrics – you will get the number of Clicks from the advertising vendor, but in Piwik or other analytics tool, you see the number of Visits (session). These are two different metrics and even if I click twice on an ad within a short period of time (Visit length), it will be still be reported as a single visit. It’s still alarming for performance marketing, as you shouldn’t be charged twice for the click on the same ad by the same user.

Campaign tracking in Piwik allows you to track the efficiency of your various marketing campaigns and provides you with detailed Campaign reports. Click here to learn more.

Piwik recognizes UTM tags and reports the data under Campaigns. Use them to distinguish the data from your advertising vendors so that you can see which are under or over reporting the data. Or maybe your ad network is counting bot traffic?

To get more in-depth campaign data reporting, install the Advanced Campaign Reporting plugin.

When you tag each of your advertising vendors and campaigns with a unique name, it’s easier to track the performance of each as well as the discrepancies between the data reported by the vendor and your analytics tool.

The solutions mentioned above should bring your data discrepancies back down to the acceptable 5% difference. If your reports are still displaying inaccurate numbers, then consider enlisting the help of the Piwik experts from Piwik PRO as they will be able to identify and resolve your data discrepancies.

The post Data discrepancies between Piwik and other analytics platforms appeared first on Piwik PRO - Cloud and Enterprise Analytics.

Show more