Navigation Menu

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

Email reports with a CSV file should use the friendly column names ("Visits" instead of "nb_visits") #17122

Open
mattab opened this issue Jan 20, 2021 · 5 comments
Labels
c: Consistent Reports & Analytics UX For bugs and features that make Analytics reporting UI behave more consistently. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jan 20, 2021

When creating an email report in the "CSV" format,
the CSV file uses "raw" column names, like this:

Visits Summary
nb_uniq_visitors,nb_visits,nb_actions,max_actions,nb_actions_per_visit,avg_time_on_site,bounce_rate
8068,8146,21495,291,2.6,00:03:23,60%

Here is the top of the CSV file:

Screenshot from 2021-01-26 12-37-29

Maybe it would be easier for most people If we added translateColumnNames=1 to the CSV report generator request,
so that the output would go to the more friendly format eg:

Visits Summary
Label,Unique visitors,Visits,Actions,Users,Maximum actions in one visit,Total time spent by visitors (in seconds),Bounces,Visits with Conversions 
Germany,1781,1788,4850,0,66,409926,1032,709,613,613

also it seems that even when downloading any report in Matomo it also sets translateColumnNames=1? (I've been trying but can't find a way to generate the CSV report with "raw" columns from the "Export this data" icon below reports. ). So doing this for email reports as well would maybe make it overall more consistent.

@tsteur tsteur added c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels Jan 20, 2021
@tsteur tsteur added this to the Priority Backlog (Help wanted) milestone Jan 20, 2021
@hamburnyog
Copy link

Hi, I would love to take a stab at this issue. I am learning how to contribute to open source and this looks like an amazing learning opportunity! Please let me know how can I start. 😄

@sgiehl
Copy link
Member

sgiehl commented Jan 27, 2021

@hamburnyog Happy to hear you want to contribute. How familiar are you with Matomo already?
The issue is about email reports, so the correct plugin to start would be the ScheduledReports plugin.
The reports are generated in the API, so guess that needs to be adjusted somehow. See https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/ScheduledReports/API.php#L317

@hamburnyog
Copy link

@hamburnyog Happy to hear you want to contribute. How familiar are you with Matomo already?
The issue is about email reports, so the correct plugin to start would be the ScheduledReports plugin.
The reports are generated in the API, so guess that needs to be adjusted somehow. See https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/ScheduledReports/API.php#L317

TBH, I just found out about matomo but I did similar reporting tasks before. Thanks for this response, gonna read this.

@atom-box
Copy link

Since this feature already exists as an API option, perhaps implementation for the emailed reports can leverage the existing code that is used in the API translateColumnNames option?

For example here is the syntax in the context of an example API call.

https://www.example.com/matomo/index.php?module=API&format=CSV&idSite=13.=day&date=today&method=CustomReports.getCustomReport&idCustomReport=91&reportUniqueId=CustomReports_getCustomReport_idCustomReport--91&expanded=1&token_auth=foobarbaz&filter_limit=10&language=en&translateColumnNames=1

@atom-box
Copy link

We had a request for this feature last week. The user asked:

(We) want this "friendly" column name report as part of the Email Report functionality, and as observed working with the Matomo tool

And further:

some labels are nb_hits, nb_visits which are the metrics for Number of views on this page and Number of Visits (30 min of inactivity considered a new visit).
We want the above metrics to be labelled as the entire string "Number of views" and "Number of Visits" accordingly.

@mattab mattab added the c: Consistent Reports & Analytics UX For bugs and features that make Analytics reporting UI behave more consistently. label Dec 11, 2023
@mattab mattab changed the title Email reports with a CSV file: use friendly column names eg. "Visits" instead of "nb_visits" Email reports with a CSV file should use the friendly column names ("Visits" instead of "nb_visits") Dec 11, 2023
@mattab mattab modified the milestones: 5.x.0 - Priority issues, 5.3.0 Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Consistent Reports & Analytics UX For bugs and features that make Analytics reporting UI behave more consistently. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

5 participants