FAQ › How to …?

  1. How do I exclude traffic from an IP or a range of IP addresses?
  2. How do I exclude query parameters from my reports?
  3. How do I set the time zone for my reports?
  4. How do I specify the currency used in the Goals revenue reports?
  5. How do I specify which websites to load by default in Piwik?
  6. How to specify the date used by default in Piwik reports?
  7. How can I set custom groups of pages (structure) so that page view are aggregated by categories?
  8. How to make Piwik faster?
  9. After the top 500 or top 1000 rows, Piwik automatically groups pages, keywords, websites, etc. under the label "Others"; How can I force Piwik to not limit the data?
  10. How can I force the reports to be re-processed from the logs?
  11. Can I get reports for a custom date range?
  12. How to track error pages (404 pages) in Piwik? Which URLs are 404 and which referers lead to these pages?
  13. How do I track visits on my intranet?
  14. How do I automatically login my users in Piwik when they go from my CMS to Piwik?
  15. How do I delete all statistics for a given websites, or for all websites?

Answers

  1. How do I exclude traffic from an IP or a range of IP addresses?

    Piwik Super User can specify, in the Websites admin panel, a list of IPs, or IP ranges (132.4.3.* or 143.2.*.*) to be excluded from being tracked on all websites.
    Each Piwik admin user can also specify the list of IPs or IP ranges to exclude for a specific website.

  2. How do I exclude query parameters from my reports?

    If your websites use URLs query parameters in your URLs or session ID parameters that you are not interested in seeing in the "Actions > Pages" report, the Super User can exclude these parameters by entering them into the Global list of Query URL parameters to exclude field in the Websites admin panel. Each Piwik admin user can also exclude query parameters for specific websites, by entering them in the Excluded Parameters list for this website.

  3. How do I set the time zone for my reports?

    By default, websites use the UTC time zone. You can specify the time zone to use for each website in the Websites admin panel. Note that changing the website's timezone will only affect data going forward.

  4. How do I specify the currency used in the Goals revenue reports?

    By default, Piwik reports revenues in $ US dollars. Piwik Super User can specify the currency to use for the Goals reports, for each website, in the Websites admin panel.

  5. How do I specify which websites to load by default in Piwik?

    Each user can specify which websites should be loaded in Piwik. Alternatively, users can choose to load the "All websites" dashboard, which gives an overview of the status and evolution of all websites available to the user.

  6. How to specify the date used by default in Piwik reports?

    By default, Piwik will load reports for "yesterday". Each Piwik user can specify, in their "User settings" admin panel, the date to load by default in Piwik reports: "Today", "Current week", "Current month" or "Current year".

  7. How can I set custom groups of pages (structure) so that page view are aggregated by categories?

    In the Piwik Javascript tracking code, you can specify custom page names by using the piwikTracker.setDocumentTitle() method; (Read more information about the Piwik Javascript Tracking options).

    In the Piwik Page views reports, by default all page names are automatically categorized in groups delimited by the character '/'. For example, if you set a custom page name piwikTracker.setDocumentTitle("Products / Gardening / id=123");, Piwik will record this page view in the directory "Products", the sub-directory "Gardening" and the page name "id=123". This means that you will get the total number of visitors viewing pages in Products, Gardening, as well as hits on the specific page "id=123".

    If you would like to change the delimiter used to categorize pages, you can for example set in your config/config.ini.php:
    action_category_delimiter = ::

    You can then define your custom page names as follows: piwikTracker.setDocumentTitle("Products :: Gardening :: id=123"); and the grouping will be done based on this new delimiter.

  8. How to make Piwik faster?

    By default, Piwik reports are processed when you request them in the User Interface. Please see How to setup auto archiving of your reports every night? to automate the generation of Piwik reports. See also How long does the Piwik archiving process? for expected speed for high traffic websites.

  9. After the top 500 or top 1000 rows, Piwik automatically groups pages, keywords, websites, etc. under the label "Others"; How can I force Piwik to not limit the data?

    For performance reasons, Piwik will by default keep only archive the first top 500 pages, top 1000 keywords, top 1000 websites, etc. Piwik will then sum all the remaining pages, keywords, etc. under the label "Others".

    If you wish to archive all the data, or simply archive more than the current rows limit, you can override these values in the configuration file config/config.ini.php. For example, to limit all table to 5000 entries, add the following in config/config.ini.php:

    [General]
    ; maximum number of rows for any of the Referers tables (keywords, search engines, campaigns, etc.)
    datatable_archiving_maximum_rows_referers = 5000
    ; maximum number of rows for any of the Referers subtable (search engines by keyword, keyword by campaign, etc.)
    datatable_archiving_maximum_rows_subtable_referers = 5000
    ; maximum number of rows for any of the Actions tables (pages, downloads, outlinks)
    datatable_archiving_maximum_rows_actions = 5000
    ; maximum number of rows for pages in categories (sub pages, when clicking on the + for a page category)
    datatable_archiving_maximum_rows_subtable_actions = 5000

  10. How can I force the reports to be re-processed from the logs?

    In some very rare cases, it might be useful to force Piwik to re-process the reports from the original logs. By default, reports will only be processed once (preferably with an automatic cronjob setup at night) and then archived in the database. When you visit the Piwik UI, all you see if data read directly from these archive tables.

    To force Piwik to re-process your reports there are two ways:

    • To trigger the archiving for all the reports, you can delete all piwik_archive_* tables. The next time you visit the Piwik UI, Piwik will automatically detect that the archives are missing, re-create the tables, and re-trigger the archiving.
    • If you just wish to re-trigger reports for a given date, you can manually set always_archive_data_day=1 to force archiving of the daily reports, and/or always_archive_data_period=1 to force archiving for all period reports (week, month, year). If you then visit the Piwik UI for a given date, reports will be re-processed. When you are done, do not forget to set these values back to 0
      always_archive_data_day=0
      always_archive_data_period=0
  11. Can I get reports for a custom date range?

    Piwik currently reports on days, weeks, months and years. Reports for a custom date range (e.g. "from 4th november to 24th december") is not yet available, as this would potentially be too computationally intensive. As we improve Piwik's algorithms and data structure we may add this feature at a later date. Stay tuned!

  12. How to track error pages (404 pages) in Piwik? Which URLs are 404 and which referers lead to these pages?

    Pages regularly appear and disappear on websites, other websites might link to wrong URLs on your website, etc.

    You can track with Piwik which URLs are leading to a 404, and which referer pages link to 404 on your website.

    • Setup a custom 404 page: you can easily do this if you use a CMS (for example, in wordpress, all 404 pages are loading a custom 404 template). If you don't use a CMS, you can usually specify a 404 custom page in your webserver configuration file.
    • Add the Piwik tracking code in this custom 404 page. Edit the tracking code and set: piwikTracker.setDocumentTitle('404/URL = '+encodeURIComponent(document.location.pathname+document.location.search) + '/From = ' + encodeURIComponent(document.referrer));
    • In your Piwik report, in Actions > Pages, you will now have a new entry for the 404 pages. It will also list the full URL of the 404 pages, as well as all referers leading to this page. Enjoy!
  13. How do I track visits on my intranet?

    Piwik can track visits on your intranet website as long as Piwik itself is hosted in your intranet.

  14. How do I automatically login my users in Piwik when they go from my CMS to Piwik?

    Some Piwik users automatically provide their CMS customers with Piwik statistics. If you want to provide a one-click automatic login to Piwik for your users, you can pass their login & the md5 string of their password in the URL parameters:

    /pathpiwik/index.php?module=Login&action=logme&login=your_login&password=your_MD5_password

    This will log the user (create a cookie in their browser) and redirect to the index.php on succesful login. We advise to do this authentication over HTTPS. Note that this authentication method doesn't work for the Super User.

    You can also specify the URL to redirect after a successful login, if different from the default Piwik dashboard page:

    /pathpiwik/index.php?module=Login&action=logme&login=your_login&password=your_MD5_pwd&url=http://piwik.mycompany.com/subpath/

  15. How do I delete all statistics for a given websites, or for all websites?

    It is possible to keep all the websites information (names, defined goals, etc.) and only delete the stored analytics data. However, there is currently no tool available to do this: you can directly delete the data from the Piwik database. Do the following:

    • Delete all the mysql tables with a name starting with piwik_archive_* ; they will automatically be re-created when Piwik processes the reports
    • Execute the following query: DELETE FROM piwik_log_visit WHERE idsite = X with X replaced by the website ID you wish to reset.

You may also be interested in...

Entries (RSS)