When I set the period to something else than "day" (e.g. "week"), I don't see the count of unique visitors in stats, for example in custom vars.
How easy would it be to fix this? Keywords: unique visitors,period
Unique visitors should be processed for week and month aswell. It is disabled for year and range period. The are config options in global.ini.php like enable_processing_unique_visitors_year.
enable_processing_unique_visitors_day, enable_processing_unique_visitors_week and enable_processing_unique_visitors_month are both 1. In custom vars, when period is "day": [[Image(http://www.abload.de/img/auswahl_029jrawn.png)]] When period is "week": [[Image(http://www.abload.de/img/auswahl_030dql10.png)]]
Should that look different? Or does Piwik need at least 7 days of data to show unique visitors in custom vars?
There is probably a bug in the columns code for some of the settings- thanks for the report!
This won't be easy to fix. Unique visitor counts are only calculated for metrics. Doing so for reports would mean running the report processing SQL for weekly/monthly/yearly periods instead of just adding the daily reports up. That's not to say it's impossible, but it would be hard to do, and much harder to scale.
For now, I don't think this can be fixed. Later, though, we could do the following:
For low traffic sites - Move the SQL used to create daily reports into entities/classes that describe the report itself, as opposed to mixing the SQL in plugins & ArchiveProcessing. - Modify Period archive processing to do summing when not processing unique visitors and to modify the SQL used in daily reports when processing unique visitors.
NOTE: Will need benchmarks to see exactly when this won't scale.
For high traffic sites - Get Piwik to work w/ different NoSQL backends. - Provide a plugin/backend that uses Redis to determine unique visitor under various conditions.
Resources - http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html - http://blog.getspool.com/2011/11/29/fast-easy-realtime-metrics-using-redis-bitmaps/
We will not process unique visitors for each of the Tables reports rows, since it's too performance intensive. For Unique Visitors as a general metrics see: http://piwik.org/faq/how-to/#faq_113