@pcworld opened this Issue on June 13th 2012

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

@sgiehl commented on June 13th 2012 Member

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.

@pcworld commented on June 14th 2012

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":
When period is "week":

Should that look different?
Or does Piwik need at least 7 days of data to show unique visitors in custom vars?

@mattab commented on July 19th 2012 Member

There is probably a bug in the columns code for some of the settings- thanks for the report!

@diosmosis commented on July 19th 2012 Member

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.


@mattab commented on July 31st 2012 Member

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

This Issue was closed on July 31st 2012
Powered by GitHub Issue Mirror