FAQ › Troubleshooting

  1. Piwik shows "No Data" in all reports.
  2. Statistics from Piwik and my other web analytics tool (log analyzer, webalizer or javascript based) are different, why?
  3. Visits from search engines or campaigns are not recorded, Piwik shows "No data available".
  4. Piwik doesn't detect accurately the Country and/or Continent of my visitors.
  5. The graphs (pie chart, bar chart, evolution graph) are not showing in my Piwik.
  6. The sparklines (small graphs like ) are not showing in my Piwik.
  7. The Piwik Javascript code shows a red cross (on IE) or a broken image icon instead of the 1*1 transparent Pixel, what is the issue?
  8. How can I purge Piwik logs?
  9. I get the error message: "Fatal error: require_once() [function.require]: Failed opening required XYZ in /path/piwik/XYZ.php on line X". How can I get Piwik to work?
  10. What should I do when I get the error message: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)
  11. I get the error "Warning: gzuncompress() [function.gzuncompress]: data error" when looking at my Piwik reports.

Answers

  1. Piwik shows "No Data" in all reports.

    There are several possible reasons why Piwik is not tracking your visits properly:

    • Incorrect Piwik tracking code
      Please check that you can find the Piwik javascript code on your website pages that you wish to track. Sometimes, when you copy paste the javascript code in other softwares, like Word or FrontPage, they may add extra spaces or characters. Make sure the code looks like this example (and that it mentions the right URL of your Piwik installation).

      In some cases, when you install Piwik on your local test server, the javascript code might contain "localhost" or "127.0.0.1". When you deploy Piwik in production, you have to edit the Javascript code so that it points to your website URL, eg. "http://example.org/piwik/".

      Also, each Piwik tracking code contains the idsite of your website registered in Piwik. If you only registered one website in Piwik, the idsite found in your Javascript code should be "1".

    • Testing Piwik with disabled Javascript
      Piwik only tracks visitors with javascript enabled. When you are testing that Piwik tracks visits properly make sure you have javascript enabled.
    • Piwik displays a red cross (on IE) or a broken image icon on your tracked pages, instead of the 1*1 transparent Pixel
      Check out this FAQ answer.
    • Do you have logs registered in your Piwik database?
      If your Piwik tracking code is properly installed, Piwik would record visits in your database. You can use phpMyAdmin to look at the table "piwik_log_visit" and see if there are visits recorded. Alternatively, you can enable the plugin "DBStats", and then go to the "Database usage" tab in your Piwik administration area, and check if the table piwik_log_visit has any rows.
    • Make sure you are viewing reports for the correct website and date in Piwik
      In Piwik, make sure you selected the right website in the website selector. Also, try to look at reports for "today" by changing the date in the date picker. Please wait at least 10 seconds after generating visits on your website: by default Piwik will only process reports every 10 seconds when "today" is selected.

    • Local copy of piwik.js outdated
      Some users make a local copy of piwik.js on a different server than their Piwik installation. This is not officially supported and causes issues when the piwik.js bundled with Piwik is updated and not compatible with the previous version (for example, this is the case in Piwik 0.5.5). Please check that your Piwik JS tracking code is exactly the one given in the Piwik admin screen.
    • Using Piwik latest version
      If you are still seing "No data", please make sure you are using the latest version of Piwik (if not, update now).
  2. Statistics from Piwik and my other web analytics tool (log analyzer, webalizer or javascript based) are different, why?

    There could be a various number of reasons why Piwik numbers are different from your other web analytics solution.

    • Tracking Method: Piwik is using a javascript based tracker, and keeps count of unique visitors with a tracking cookie. Logs analyzers softwares (AWStats, Webalizer, Analog, etc.) or custom server-side script would record all traffic including bots and generally rely on the IP address and user agent to determine unique visitors, which is less accurate.
    • Hits vs Visits: Log analyzers softwares will typically report "hits". Hits generally count all http requests to your websites: pages, images, css, javascript files, etc. Piwik reports page views, unique visitors, visits, etc. which are expected to be much less than the number of hits.
    • Record loaded page: when the Piwik javascript code is located at the end of the page, Piwik will only record page views for page that are finished loading. Log Analyzers would also record page requests that have been "cancelled", eg. when the user hits the Back button before the page is displayed.
    • Visitors Browser: Piwik will count visitors with Javascript and Images enabled. Other softwares may record visits from visitors with Javascript disabled, which would include non human activity like search engine bots.
    • Position and presence of Javascript tag: when comparing Javascript-based statistics (eg. number of unique visitors), you have to make sure that both javascript tags are present on all pages you want to track. Also, it is better to put all tracking codes at the end of your pages, just before the </body> tag.

    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.

  3. Visits from search engines or campaigns are not recorded, Piwik shows "No data available".

    There are a few possible explanations:

    • Are your pages tagged correctly?
      If you click on your website in a search result, and look at your page source, can you see the Piwik tracking code? Make sure the Piwik tracking code is installed on all the pages you want to track, and is not within an iframe. We advise to put the Piwik code just before the </body> tag.
    • Are you using a redirect on your landing page?
      If you are using a redirect, the visitor browser may lose the referer information. Make sure that your visitors arrive directly on the page with the Piwik tracking code installed.
    • Piwik only records 1 referer by visit, which means that only the first referer used to access the website will be recorded.
      If you search for a keyword in a search engine, click on your website in the search engine results, and land on a page with the Piwik tracker, you may expect to see the keyword in your Piwik reports.
      However, if you visited your website less than 30 minutes ago, Piwik will recognize you as an known visitor on the website, will record your page view, but will not update your visit referer. Piwik only record the first referer of a visit. When testing Piwik and search engine detection, make sure you make the test more than 30 minutes after your last page view on your website.
  4. Piwik doesn't detect accurately the Country and/or Continent of my visitors.

    Unless you're using the GeoIP plugin, 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, please install the GeoIP plugin.

  5. The graphs (pie chart, bar chart, evolution graph) are not showing in my Piwik.

    The Piwik graphs require 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 graphs are 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.

  6. The sparklines (small graphs like ) are not showing in my Piwik.

    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 php-gd for you.

    On linux, you can install php-gd by executing "apt-get install php-gd" on debian type systems.

  7. The Piwik Javascript code shows a red cross (on IE) or a broken image icon instead of the 1*1 transparent Pixel, what is the issue?

    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.

  8. How can I purge Piwik logs?

    Currently Piwik logs are not automatically purged. This is a high priority feature that we expect to release before Piwik 1.0 (see Roadmap).
    In the meantime you can manually delete your logs, after making sure that all reports have been processed.

    1) you need to make sure you've run archiving for all your websites for the previous days, weeks, etc. See the guide "how to setup auto archiving" and make sure you run it, and all your reports are processed
    2) you can delete the logs from the database. If you want to delete the logs older than 30 days, you can run:

    DELETE piwik_log_visit, piwik_log_link_visit_action
    FROM piwik_log_visit INNER JOIN piwik_log_link_visit_action
    WHERE piwik_log_visit.idvisit = piwik_log_link_visit_action.idvisit
    AND visit_server_date <= CURRENT_DATE() - 30

  9. I get the error message: "Fatal error: require_once() [function.require]: Failed opening required XYZ in /path/piwik/XYZ.php on line X". How can I get Piwik to work?

    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!

  10. What should I do when I get the error message: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)

    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.

  11. I get the error "Warning: gzuncompress() [function.gzuncompress]: data error" when looking at my Piwik reports.

    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.

You may also be interested in...

Entries (RSS)