Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processed report does not add all metrics to columns #6102

Closed
tsteur opened this issue Sep 2, 2014 · 1 comment
Closed

Processed report does not add all metrics to columns #6102

tsteur opened this issue Sep 2, 2014 · 1 comment
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Sep 2, 2014

Feel free to move it to 2.7.0

While testing the new contents #4996 feature on the Piwik Mobile app I noticed I was not able to pick the interaction_rate column which is a processed metric.

Investigating a bit I noticed that we only add the default processed metrics to the columns array and I am not sure if this is on purpose or not? See https://github.com/piwik/piwik/blob/2.6.0-b1/plugins/API/ProcessedReport.php#L505

In my case $reportMetadata['processedMetrics'] is an array like array('interaction_rate' => 'Interaction Rate') but it won't be added to the columns array as it is not a default processed metric.

So API.getProcessedReport returns the following:

columns: {
   label: "Content Name",
   nb_impressions: "Impressions",
  nb_interactions: "Interactions"
},

but should be maybe (unless it is like this on purpose)

columns: {
   label: "Content Name",
   nb_impressions: "Impressions",
   nb_interactions: "Interactions",
   interaction_rate: "Interaction Rate"
},

Same for metricsGoal further down. But all metrics are added to the columns.

So is it on purpose or not? Looks like a bug to me

@tsteur tsteur added the Bug label Sep 2, 2014
@tsteur tsteur added this to the Piwik 2.6.0 milestone Sep 2, 2014
@mattab mattab modified the milestones: Piwik 2.8.0, Piwik 2.6.0 Sep 2, 2014
@mattab
Copy link
Member

mattab commented Sep 2, 2014

I dont think it's on purpose, unless it would change the UI. But still looks like a bug.

Maybe there is an opportunity to improve the platform eg. a Metrics object that would let configure and extend metrics?

tsteur added a commit that referenced this issue Sep 3, 2014
… all processedMetrics in columns array of processed report
@tsteur tsteur modified the milestones: Piwik 2.6.0, Piwik 2.8.0 Sep 3, 2014
@tsteur tsteur self-assigned this Sep 3, 2014
@tsteur tsteur closed this as completed Sep 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants