Introduction¶
The data reports from Statistics are very similar to Google Analytics reports, typically with only 5-10% difference in data for numbers of visits/sessions, page views, and so on.
The following data is not compiled in the same way with the two services, and these are most often the areas where data discrepancies are found.
This article provides information about the Web Governance Statistics method of collecting data, and outlines some causes for figure discrepancies between this method and Google Analytics.
DoNotTrack¶
Web Governance Statistics respects the DoNotTrack setting by default. If visitors to your domain have selected not to be tracked in their browser, the Statistics feature will not collect information about them.
Bots and spiders tracking¶
By default, Statistics uses a Javascript tracker which automatically only records “real” human activity and excludes all bot activity. This leads to more accurate reports. If Google Analytics does not exclude bot activity, this can result in a large discrepancy (over 5%).
Presence of Javascript code tag¶
Javascript-based statistics (such as the number of unique visitors) need to include both Javascript tags on all of the pages that you want to track. If some pages are tracked in one tool but not the other, this could be the cause for a discrepancy.
Visitor identification¶
The Statistics feature uses a Javascript-based tracker and counts unique visitors with a first-party UUID cookie. It also uses a visitor recognition algorithm that is based on the IP address and user settings. Some other tools only use cookies, only use IP, or use a combination. Visitor tracking in Web Governance Statistics is accurate and avoids creating artificial visits.
Hits and visits¶
Many log analysis software reports show “hits”. Hits generally count all HTTP requests to your websites, such as pages, images, CSS, JavaScript files, and so on.
Web Governance statistics reports show page views, visits, and so on. These figures tend to be much lower than the number of hits.
Record loaded page¶
Statistics only records page views for pages that are finished loading. Other log analyzers also record page requests that have been “cancelled”, such as when the user hits the Back button before the page is displayed. This can result in much lower page views in the Statistics module.
IP address exclusions¶
Check that you have configured Web Governance Statistics and Google Analytics in the same way when you want to ignore counting users with specific IP addresses.
Statistics does not Sample the Data¶
The Web Governance Statistics feature reports 100% of the visits that are tracked in the reports. Other tools, including Google Analytics, sometimes only provide sample reports including segments.
Incorrectly configured web server¶
If the web server used for Statistics is incorrectly configured or is configured with very restrictive settings, this can lead to some tracking requests not being recorded. For example, HTTP 414 (URI Too Long) or HTTP 413 (Request Entity Too Large) can both be encountered if the web server is too restrictive in its configuration. Check the web server error logs or access logs for any responses other than HTTP 200 (Ok) and HTTP 204 (No Content) for the matomo.php
or piwik.php
endpoint to help identify this issue.
Additional resources¶
For more information, visit Why does Google Lighthouse give different results than the Performance Module.