There are several possible reasons why Piwik is not tracking your visits properly:
There are a few possible explanations:
_paq.push(['setLinkTrackingTimer', 750]); // increase to 750 milliseconds
To improve Visitor Country detection, you should configure Geo Location in Piwik (click to learn more).
If you are not using Geo Location, Piwik is guessing your location from the language locale disclosed by the browser, e.g. en-us -> country is set to USA, fr-fr -> country is set to France, etc. In some cases, Piwik will guess the location when the region is omitted, e.g., fr -> France. This can be disabled from config/global.ini.php (or overridden in your config.ini.php):
enable_language_to_country_guess = 0
If you want to improve the country detection accuracy in Piwik, setup Geo Location now.
There are a few possible reasons that Piwik could be slow to load:
There could be a various number of reasons why Piwik numbers are different from your other web analytics solution.
Concerning Google Analytics, several users compared Piwik and Google Analytics numbers, and found very similar statistics: on significant traffic, differences were always less than 5 percent.
Conservative counting is definitely best - it makes your statistics more realistic on what you are trying to measure. Most analytics packages are used to measure relative upswings, we recommend using the same tool for all measurements and relative comparisons.
When you upgrade Piwik to the latest version, it sometimes happen that Piwik stops working -- especially when the User Interface is not working (blank white page, widgets not loading, error message, etc.).
There are a few things to check that will most likely resolve the User Interface issue you are having:
Also, check out the other FAQs in this "Troubleshooting" category, as there might be other solutions for your problem.
If it still does not work, please search the Piwik Forums, and if there is no post about your problem, please create a new topic.
If you are not seeing Graphs in Piwik, the most likely reason is that you are using Piwik < 1.5 which are using Flash graphs, and you do not have Flash enabled in your browser.
As of Piwik 1.5, graphs in Piwik are drawn using open source technologies supported in all modern browsers: see Canvas and Jquery graphs blog post.
The GD library is not installed on your server. This library is required to produce the sparklines. Please ask your system administrator or your web host to install php5-gd for you.
On linux, you can install php-gd by executing "apt-get install php5-gd" on debian type systems, then restart your webserver.
There are 2 solutions
[Debug] disable_merged_assets = 1
Then, delete your browser cache and refresh Piwik: after a few seconds, it should display correctly again!
On Intranet websites, often most users have the same IP address, and often the same browser and configuration settings. This causes Piwik to believe that most page views come from the same visitor. To fix this on Intranet websites, see this FAQ: Enabling Piwik on Intranet websites.
The Piwik World Map requires the plugin Flash to be displayed. Please check that you have installed Flash in your browser. Click here to install the flash plugin.
If you have installed the Flash plugin, and the world map is still not showing, maybe you are using a browser extension that blocks the flash content? For example, if you're using the AdBlock extension, there's a notable bug where it blocks Flash content in <object> tags even if the page is whitelisted. Please consider using AdBlock Plus as a replacement.
When Piwik is showing a red cross image, or a broken image icon, it means that tracking visits is failing on your Piwik installation. It is not expected and should be investigated to fix the root of the problem as soon as possible (in the meantime, your visits are most likely not recorded).
To see where the error comes from, open your website in Firefox, right click on the broken image icon, and click on "View Image". This should redirect you to the URL "yourwebsite.com/piwik/piwik.php?..." and the error message should be showing.
If the error message mentions MySQL, the error might come from a broken mysql instance or tables. Try to "repair" your MySQL tables (using phpMyAdmin for example).
If the error mentions "failed to open stream: No such file or directory" this might be caused by missing Piwik files. Make sure all Piwik files are properly uploaded.
For other errors, try to search on the search engine on Piwik.org.
You can also try the Piwik support forums for more help.
If your host uses mod_security to block requests containing URLs (eg. hosts like HostGator, The Planet), you should contact your provider to whitelist your domain (or URL) and disable mod_security for your website.
_paq.push(['trackPageView']); you can add the following line
In rare cases, Piwik will show "no data" only for one day or one month, while other periods work fine and report visits as expected.
If you are not yet using at least Piwik 1.6, please update now (we fixed issues related to this problem in 1.6 and latest).
It is possible to re-process the specific days or months that are showing zero visit, check out this faq: Re-process reports.
The Transitions Plugin gives you a report that shows the things your visitors did directly before and after viewing a certain page. There are few cases, where the data displayed in Transitions is slightly off compared to what you might expect.
The number of pageviews shown in the pages report doesn't match the number of pageviews in the Transitions popover. There are several possible explanations:
Another case of odd numbers is when the sum of the groups on the left does not equal the total number of pageviews. If you think that this is the case, first make sure that you have included the page reloads in your calculation. If the numbers still don't match, read on.
This can happen when there were downloads or outlinks tracked directly before views of the page in the center. We could have added a group on the left "From Downloads" and "From Outlinks" but we decided not to, as it would make the interface more complex unnecessarily. Since we didn't want to add the missing pageviews to any of the other numbers, the sum of all groups that are shown might differ from the total number of pageviews.
The main limitation of Transitions is that it only works on the period of time you still have the logs for. If you have set up Piwik to delete old logs, the pages report will still contain data from before because the reports were archived. Since Transitions reads its data directly from the logs it can only work if you still have the logs.
Another reason for an apparent case of incomplete data, is connected to the truncation of reports. Piwik doesn't necessarily report every unique URL on your website, but instead there is a limit for the maximum number of rows in the pages report (which can be changed). Usually that's not a problem because the number is high and if you haven't heard about it yet, it probably doesn't apply to you. But if this happens on your data, there might the case that for some days of a period, the page is listed under Others but not for other days. The report for the period is the sum of the daily reports and therefore it can happen, that a URL is "missing" on some days and not on others. The sum of the pageviews will be too low in the actions report but Transitions reports the number of pageviews correctly. It can do so because it doesn't use the archives but the logs.
Piwik tracks visitors activity, and then computes aggregated reports. The settings page lets you
1) Delete old Tracking Logs
You can configure Piwik to automatically delete your older tracking logs from the database. Deleting old logs has many advantages: 1) it will free significant database space, 2) which will slightly increase performance, 3) for Privacy reasons, it is sometimes recommended to keep detailed logs only for 6 months or so, and remove older data.
To configure Log delete in Piwik, login as the Super User, click on Settings > Privacy > Delete old visitor logs from database. You can then configure to Delete logs older than N days, and execute the log purging every day, every week or every month. When 'Delete old logs' is enabled, only the raw logs of activity will be deleted from the database. Specifically, only the Mysql tables starting with piwik_log_* are affected.
Important: When you enable automatic log deletion, you must ensure that all previous daily reports have been processed, so that no data is lost. See this FAQ for more information.
Deleted data: All deleted data is lost forever.
If you have properly setup the auto archiving script (see important note), you will still access all historical reports (even when logs are deleted).
2) Delete old reports data
If your Mysql database space is limited, you can also Delete old reports in Piwik > Settings > Privacy. You can choose to keep daily, weekly, monthly and / or yearly data. We recommend keeping monthly and yearly data as an interesting dataset.
If you enable any of the 2 features to delete old data, the Database estimate size will refresh and give you an idea how much space you would save using the feature. If you cannot wait for the next automatic tasks schedule, you can also force the purge by clicking on 'Purge Now'.
When you automatically import your existing userbase in Piwik using the UsersManager API, you might want to disable the check of minimum length and valid characters for the User's login and password.
In particular, Piwik requires a password at least 6 characters long, and a login string that must contain only valid characters (ie. letters, @, etc.).
You can disable these checks by adding in the file config/config.ini.php the following:
disable_checks_usernames_attributes = 1
Your firewall may be blocking outbound HTTP requests. If you have a HTTP proxy (e.g., squid), you can configure the forward proxy as follows.
Edit your config/config.ini.php and add the following:
host = ; Proxy host: the host name of your proxy server (mandatory)
port = ; Proxy port: the port that the proxy server listens to. There is no standard default, but 80, 1080, 3128, and 8080 are popular
username = ; Proxy username: optional; if specified, password is mandatory
password = ; Proxy password: optional; if specified, username is mandatory
Once configured, Piwik will contact external hostnames using this proxy server.
Unfortunately, Segmentation fault Piwik errors mean that the lower level software has crashed in some unexpected fashion. In this case, most likely PHP or some of its specific modules (PDO, mysqli, etc.). It is possible to overcome this issue by updating these softwares.
If you get the Segmentation fault error, the solution is to:
You should now have a working Piwik instance that does not crash, congratulations.
This error message means that PHP couldn't include a file that Piwik requires. Please make sure all Piwik files are correctly uploaded on your server. You can reupload the missing files by looking at the error message, or reupload all Piwik files and try again: this should work!
This means that Piwik could not connect to your MySQL database. If you are on a dedicated server, you can try to restart the Mysql server by running, for example,
/etc/init.d/mysql restart. If you are on a shared web hosting, we recommend contacting your web host and ask them to investigate why it fails to connect to the Mysql server.
This error happens in very rare cases where, for some unknown reasons, the data was not properly recorded in the database. In Piwik, all reports data is compressed (gzip) and then stored in the tables piwik_archive_*.
To fix this issue, look at the error message and search for "piwik_archive_blob". For example, if the error looks like:
#0 Piwik_ErrorHandler(2, gzuncompress() [function.gzuncompress]: data error, /path/piwik/core/Archive/Single.php, 250, Array ([name] => Referers_searchEngineByKeyword,[typeValue] => blob,[table] => piwik_archive_blob_2009_05,[...]
You can find "piwik_archive_blob_2009_05". Please delete this table in your Piwik database. Piwik will process it again next time you are viewing reports. This will fix the issue.
By default Piwik will try to detect the current Hostname and use it in all emails sent. In some cases, the hostname cannot be detected and Piwik will use "defaultHostnameIfEmpty.example.org". You can specify your domain name to appear in From: email addresses by adding the following lines in your config/config.ini.php file:
defaultHostnameIfEmpty = mydomain.com
This will affect all emails sent from Piwik: Password reminder, Email reports. You can also change the default email address "From:" in PDF reports emails.
You must increase PHP memory limit. See this page for more info.
Your PHP is configured to stop running a script after some time, generally 30 seconds. When Piwik is used on a websites with few thousands visits per day, then this limit might not be high enough. To fix this, modify in your php.ini the max_execution_time value to zero (which means no time limit):
max_execution_time = 0
This will ensure that Piwik always has enough time to process your analytics reports.
The MySQL server has gone away (error 2006) has two main causes and solutions:
To display unicode characters in the Static image graphs, please see this FAQ.
If you're not using a reverse proxy, but using https with a web server that doesn't set the HTTPS environment variable, you can either set assume_secure_protocol=1 or reconfigure your web server.
For example, lighttpd should be configured with setenv.add-environment = ( "HTTPS" => "on" ). Similarly, nginx users should use something like fastcgi_param HTTPS on;.
Most of the time this warning is displayed, just after you have just migrated Piwik to a new URL or server, and the new hostname you use will not be the same as the stored one. In this case, ask your Piwik Administrator to update the Piwik Hostname in Settings > General Settings.
(for geeks only) How does this message improve security?
This warning is a security feature Piwik provides to make Piwik more robust and prevent the so-called "Host Injection" vulnerability. Attackers could try to send fake hostnames to Piwik in an attempt to get users to reset their password through an attacker's server. If users do that, the attacker could gain access to Piwik. Piwik protects against this type of attack by storing a list of trusted hostnames and checking if the 'Host' HTTP header in any request is in this list. If it doesn't match, we show you a warning.
You can also disable the trusted host security check if for some reason you get this warning a lot, for example if you use Piwik with a changing set of hostnames. To do so,edit your config/config.ini.php and add the following below [General]
This feature was developed as a "Security Best Practise", following a suggestion by a security researcher working with Piwik through our Security Research program.
By default, for security reasons, Piwik prevents standard pages and reports to be included in an iframe.
If you wish to include widgets in your website or app, we recommend you use the standard "Widgets" mechanism.
If you wish to include the whole Piwik in an iframe, edit your config/config.ini.php under the category [General] add the following line:
If you also wish to enable the "Settings" pages (Manage websites, Users, etc.) to load in an iframe you can also add the setting:
There are a few possibilities with regards to debug logging in Piwik:
[log] logger_message = "screen"
logger_error = "screen"
logger_exception = "screen"
log_only_when_debug_parameter = 1
[Debug] enable_sql_profiler = 1
Piwik will then output all SQL queries, group them by unique query, and show the total time spent as well as average time spent on each query.
If you have the APC cache extension enabled, then check your PHP settings. For example, 'apc.include_once_override' is experimental and should be disabled. Also there are reported problems when apc.mmap_file_mask is set. So, try this and restart the Apache httpd process/service.
apc.include_once_override = 0
apc.mmap_file_mask = /dev/zero
When you get this error, open your php.ini config file. On Windows server, simply uncomment the following line:
and restart the webserver. The error should be resolved.
When Piwik is setup to delete old logs, after the log deletion, we will run OPTIMIZE queries to claim the lost Mysql space on the database tables. These queries can be very slow to run and can cause problems on extremely large Piwik servers. If you see SQL queries and the server load going up out of control, with queries queueing because of an OPTIMIZE TABLE query, we recommend to disable all OPTIMIZE TABLE queries. To do so, edit config/config.ini.php and add: