By default, Piwik reports are in real time (learn more in the user documentation) when you are viewing reports for "today" or any date range that includes today. Piwik will look at all your logs for today in the database and process the reports every time that you request them.
By default, reports for today are processed every 10 seconds. The Piwik Super User can change this value in the "General Settings" admin panel. For high traffic websites, we recommend processing the reports once every hour (3600 seconds), which is a "near real time" approach. Please read the Setup auto archiving page for more information.
Piwik also provides a real time view of your visits on your site... right now! You can see all new page views, actions and new visits coming to your site, refreshing automatically. This feature is enabled by the Live! plugin which is enabled by default in the Piwik dashboard (check out the demo).
The unique visitor count is the number of visitors coming to your website; Unique visitors are determined using first party cookies.
If the visitor does not accept the cookie (if they have disabled, blocked or deleted cookies), a simple rule of thumb is used to try to match the visitor to a previous visitor with the same features (IP, resolution, browser, plugins, OS, etc).
Note that by default, unique visitors are available for days, weeks and months periods, but unique visits are not processed for the "year" period for performance reasons. Learn how to enable unique visitors for all date ranges.
If a visitor comes to your website for the first time, or if he visits a page (or downloads a file) more than 30 minutes after his last page view, this will be recorded as a new visit. A Unique Visitor can make multiple Visits per day.
In the first visit, the visitor is a New Visitor. From the second visit (the same day or later), a Unique Visitor is a Returning Visitor.
You can change the 30 minutes value (session timeout) by overriding [Tracker]
visit_standard_length = 1800 in your config/config.ini.php file.
Entry page is the first page of a visit.
For each Entry Page URL, Piwik reports the number of Entrances (Visits that started on this page), Bounces (Visits that started on this page but left the website straight away) and Bounce rate.
The Exit Page is the last page accessed during a visit.
Piwik reports the top Exit Pages URLs, the number of Exits, Unique Pageviews and Exit Rate. Exit rate (sometimes called "Page Exit Ratio") is the number of Exits from a page divided by total number of Page views of that page.
The super user is the only user who has the ability to create users, create websites and install plugins. There is only one super user per instance of Piwik. The super user is created during the installation process. The super user's login and password are stored in the Piwik configuration files in config/config.ini.php. All other users details are stored in the database.
The super user has superpower!
You can create users and assign them the 'admin' permission on a given set of websites. Users with the 'admin' permission can edit the website settings (Name, URLs, Timezone, etc.). They can also grant other users the 'view' or 'admin' permission on the website(s) the user has 'admin' permission.
Users with 'admin' permission cannot add other websites and users, and they cannot manage plugins.
The Super User can create users and assign them the 'view' permission on a given set of websites. Users with the 'view' permission can view all reports in Piwik for the website(s) the user is set to 'view'. The user cannot add other users, websites, or handle manage plugins.
The token_auth acts as your password and is used to authenticate in API requests. You can find the token_auth by logging in Piwik, then go the page "API" by clicking on the link in the top of the screen.
The token_auth is secret and should be handled very carefully: do not share it with anyone. Each Piwik user has a different token_auth. When a user changes its password, the token_auth will be regenerated automatically.
You can track as many websites as you like that are hosted on the same server as Piwik, or hosted on several external servers. Only the server that hosts Piwik needs to run PHP and MySQL.
You can create new websites by going to the admin area when logged in as Super User, and get the javascript tracking code to install on the websites you wish to track. For example, consider the following use case:
- You have a website built in Java hosted on server1
- You have a website built in Python hosted on server2
- You can install Piwik on server3, and track visits from the two other websites
Note about https: Piwik automatically detect if the page being tracked is https (SSL) and would include the piwik.js in secure mode from your Piwik server.
Every night, if you setup auto-archiving, Piwik will run through the logs and compile all your reports for each day, week, month and year. How long the process will take depends on your traffic, number of visits and pages, on the number of websites you have setup in Piwik... and of course on your server performance.
For example, using version 1.3 on a single core duo2 server with 3GB of ram, Piwik archiving process takes about 2 hours for 400,000 pages per day (and more than 6,000 websites).
We are constantly improving Piwik performance: making Piwik faster is a top priority. Stay tuned... or come and help us if you know how to design software to make it faster.
Also, if you have a medium or high traffic website, we would be interested to hear your experience with Piwik archiving. How long does archiving take for your traffic, how many visitors/pages, how many websites, what type of server; Please post your numbers in the High traffic Piwik servers forum post, and let us know by email.
See also the FAQ: Piwik web analytics for high traffic websites check list.
Yes, Piwik Javascript Tracking code is valid XHTML 1.0 Strict. See an example on http://piwik.org/xhtml/.
Imagine the following use case:
1) User comes to your website via the campaign "Emailing November", via a click on a link in an email tagged with Piwik (or Google Analytics) campaign parameters
2) He browses around and exits after 3 pages
3) He comes back the next day (on 2011-01-01), via a direct entry, and buys a product on your site (which you track as a Goal Conversion)
In this case, if you select the date 2011-01-01 in Piwik, it will show that the Campaign "Emailing November" did not have any visit on this day (because the user entered the website directly), but the conversion is attributed to the Last known referrer that the visitor used (which is stored in the first party cookie). On 2010-12-31, there will be one visit from the campaign "Emailing November" but no conversion on this day.
See also the FAQ: Piwik attributes conversions to the last seen referrer by default. How do I credit conversions to the first referrer instead?.
When visitors convert a Goal, Piwik tries to attribute the conversion to the referrer that brought the visit to the site. Piwik by default, will credit the last non empty referrer that was used by the visitor before he reached the Goal. In some cases, several referrers can lead a visitor to the website on different visits (eg. Search engines, Newsletter link).
You can tell Piwik to attribute the Goal conversion to the first referrer used instead of the last one, by editing your Piwik Javascript Tracking code and adding the line below, just before the call to trackPageView()
_paq.push(['setConversionAttributionFirstReferrer']);
Search engines are defined in the file core/DataFiles/SearchEngines.php
Each search engine is defined by a new line with the following format:
"main-url.com" => array( "Search engine name", "keyword parameter", [optional path containing the keyword], [optional charset used by the search engine])
For example, for Yahoo!
"search.yahoo.com" => array("Yahoo!", "p", "search?p={k}"),
The macro {k} will be automatically replaced by the keyword to link to the search engine page for the keywords found in your Piwik reports. The main search engine URL has to be at the top of the list for the given search Engine.
Note that some search engines can have several variable names to define the keyword, you can specify an array of names. For example, for the search engine Baidu.com, the keyword can be found in "wd", "word", or "kw", and the keywords are encoded in the charset "gb2312". The line for Baidu.com looks like:
"www.baidu.com" => array("Baidu", array("wd","word","kw"), "s?wd={k}", "gb2312"),
When adding a search engine, please also submit the search engine icon, for the directory plugins/Referers/images/
Please submit to the Piwik team the new search engine line in SearchEngines.php and the icon; we will add it for the next release!
Piwik provides two reports for your page views: Page Titles and Page URLs. A page title is the content of the HTML <title> tag. If your pages do not define this <title> Piwik will instead report "page title not defined" for the visits on those pages.
We also highly recommend you use the latest version of the Javascript Tracking Tag in case you are still using the old Tracking tag.
Piwik provides two reports for your page views: Page Titles and Page URLs. In some rare cases, a visitor's browser will not let the Piwik Tag request the current URL (generally for privacy reasons). If Piwik could not request the page URL from the browser, Piwik will instead report "page url not defined" for the visits on those pages.
If all your pages report "Page url not defined" then there is a data tracking problem. Here are common reasons for this issue:
Piwik uses a special php function (gethostbyaddr) to request the hostname associated to a given IP. For example, the function would return "br76.comcast.net" and Piwik would categorize the visitor as using the provider "Comcast".
Sometimes however, for specific IPs or when the function times out, Piwik doesn't know which provider the visitor is using, and will simply report "IP".
Some search engines (Google for all logged in users, DuckDuckGo, Firefox latest version now also removes keywords, etc.) may not specify the keyword used to reach your website. Piwik will report the keyword as "Keyword not defined". It means that Piwik has detected that the visitor came from a search engine, but the keyword was not provided in the Referrer URL.
There is no way to access the keyword in this case, and no other web analytics tool can get this information either.
Of course you can! We love having people help us make sure Piwik is available to as many people as possible in a language they understand. Please see Piwik Translations for more information.
The Piwik tag detects the protocol of the page being tracked, and then automatically calls the normal http or secure https Piwik server.
To track your https pages correctly, your server hosting Piwik should work when called from https. For example, https://url/to/piwik/piwik.php should return a blank page. If https://url/to/piwik/piwik.php returns an error, please contact your sysadmin to ask him to enable SSL on the Piwik server.
Many Piwik users successfully use Piwik to report analytics of Ecommerce and SSL secure shops.
On a related note, you can also force the Piwik login form to use secure SSL connections.
Piwik detects URLs tagged with Google Analytics campaign parameters. Piwik offers two dimensions for Campaign tracking: name, and keyword.
The campaign parameter (in this order: utm_campaign, or utm_medium, or utm_source) is used as the Campaign name.
The parameter utm_term is used as the Campaign keyword.
Learn more about Tracking Campaigns in Piwik or head over to the URL Builder.
SKU stands for Stock-keeping unit. A Product SKU is the Product unique identifier in your Ecommerce shop: for example, SKU for books might be the IBAN identifier for this book. A given Product might change its name overtime, but the product's SKU should always be the same. With Ecommerce Analytics, you can track Product SKUs, Product Names and Product categories and get interesting reports about their performance in our online shop.
If you enable 'Purge old visitors logs' in the Settings > Privacy menu, Piwik will regularly delete your Visitor Logs from the Database. The Logs are used by Piwik to process Reports such as "Top Keywords", "Top pages", etc. If some old logs are deleted from your database, but reports have not been yet processed, the data will be lost forever.
We highly recommend that before deleting old visitor logs from your database,
1) you setup the automatic archive processing
2) and run the archive.php script until completion at least one time
This will ensure that all daily reports for each website have been pre-processed and the logs are no longer needed for these days.
Piwik custom variables tracking provides a powerful & easy way to track custom values and variables about your visits (for example "Username", "Membership level") or page views (eg. "Category:Sport"). You can track up to 5 variables for each Visit on your website. On top of these 5 custom variables for each visit you can also track up to 5 custom variables for each page view.
Learn more about Custom Variables Analytics.
We are always looking for more quality developers to join the Piwik fun! If you want to be listed on the Piwik Consulting page, you need to know about Piwik internals: please have a look at the developer documentation, the code and the coding standards that we use to review submitted code.
To be an official Piwik Consultant, you need to either:
We will then review your work and consider adding you in the official Piwik Consulting listing.
For inspiration, please have a look at the Piwik roadmap ; the list contains lots of interesting problems to solve, in different fields: performance and scaling, User Interface, Web analytics reports, core mechanisms, Plugins related tasks, etc.
If you need more information or if you want to become a Piwik consultant, please contact us at hello@piwik.org : we are looking forward to helping you!
When you use Piwik to track your visitors, we recommend to update your Privacy Policy to explain how Piwik is used and what data it gathers. We provide a Privacy Policy template for Piwik users that you can copy on your site.
Note: If you do not already have a Privacy Policy on your page, but gather some information about your users, we highly recommend that you create the privacy policy.
To track visitors, Piwik by default uses 1st party cookies, set on the domain of your website. The cookies that Piwik create start with the following strings: _pk_ref, _pk_cvar, _pk_id, _pk_ses.
Piwik by default does not use third party cookies but you can enable a third party "_pk_uid" cookie it if you wish.
If you exclude yourself from being tracked using the cookie method, Piwik will create a cookie "piwik_ignore" set on the domain of your Piwik server (which might be a third party cookie if Piwik is setup on a different URL from the website being tracked).
You can also Disable all first party cookies from being set -- for example privacy reasons.
In some countries, the law requests websites to provide a way for users to opt-out of all tracking, in particular tracking cookies.
Piwik uses cookies to store some information about visitors between visits. See also: List of cookies used by Piwik.
It is easy to disable tracking cookies by adding one line in the Piwik Javascript code.
Edit your Piwik Javascript code as follows:
[...]
// Add this line before the trackPageView() call
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
[...]
There are various cases where cookies can be disabled: browser has cookies disabled, Piwik JS code contains call to disableCookies(), or if you are importing server logs in Piwik which do not contain cookie information.
When cookies are disabled, some data in Piwik will be less accurate. Specifically...