@dczajkacc opened this Issue on June 17th 2015

Sum for custom variable in page scope is missing, see screenshot:
ean - page scope
languageCode - visit scope

Another problem but maybe the same bug:
selected variables were tracked on every page, so actions should be "9" for all three.

Was confirmed on piwik 2.9.1 and 2.13

@mattab commented on July 15th 2015 Owner

Hi @dczajkacc

Thanks for the report.

By design:

  • Custom variables of 'visit' scope: it is expected that these ones have the "visit" column set
  • Custom variables of 'page' scope: we cannot process "Visits" count for these.
    • Why? we process "Actions" column with a SELECT count(*). A same visit can set the same custom variable of 'page' scope multiple times. We cannot sum the values of count(*) as it would be incorrect. the way we could process "Visits" Metric for 'page' scope variable is to issue a count(Distinct *) or so, but it is no implemented yet (this would likely be very slow for high traffic sites). it was part of initial design that we do not issue the count(distinct *) query and that's why we do not show "Visits" metric for 'page' scope variable.
    • The code that removes those metrics is in: https://github.com/piwik/piwik/blob/2.14.0/plugins/CustomVariables/Archiver.php#L213-226

Therefore it is working as expected :+1:

Another problem but maybe the same bug:

it's not the same bug, could you create a new issue with steps to reproduce? we will investigate.

@mattab commented on July 15th 2015 Owner

Reopening - as I think we should document this behavior in the user or developer guides somewhere to prevent confusion in other users as well!

@mattab commented on January 11th 2016 Owner

It would be useful to document this behavior directly in the UI (in report footer maybe?) , or visibly link to the help information, when this use case actually occurs (ie. when there are custom variable rows that do not have visits metrics but have actions metrics).

@mattab commented on January 27th 2016 Owner

PR: #9643

This Issue was closed on January 27th 2016
Powered by GitHub Issue Mirror