Open mattab opened 3 years ago
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. 😄
@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 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.
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
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.
When creating an email report in the "CSV" format, the CSV file uses "raw" column names, like this:
Here is the top of the CSV file:
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: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.