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
When exporting a flattened report, keep each flattened dimension as a separate column #12163
Comments
BTW: If you do it like this and this is not controlled by a new API parameter, you will be likely breaking API and needs to be mentioned in advance. Luckily mobile app is not using flatten, otherwise this could break it. |
And for processed reports you might also need to add new elements to mention which columns are the label columns, and in which order. Similar to |
While trying to implement this I encountered one problem, which I'm not sure how to solve. How should those "metrics" be named when the metrics are not returned translated? My current implementation always uses the translated name, but that might be hard to process automatically, as the name might change when a translation changes. |
Not quite sure what you mean when metrics are not returned translated? From this I am reading there is a URL param to do that? I presume when metrics are not translated, we return the metric name? For dimensions we would then return the dimensionId? Also could use Can you send a link to an example when metrics are returned untranslated? |
Translated column names would be https://demo.piwik.org/index.php?module=API&method=Events.getName&idSite=3&period=year&date=yesterday&format=HTML&translateColumnNames=1 or untranslated: https://demo.piwik.org/index.php?module=API&method=Events.getName&idSite=3&period=year&date=yesterday&format=HTML The main problem is, that in the datatables the is only a |
I reckon dimension id would be consistent, and if not available for some reason, fall back to Apart from this the output of those reports is not very good for computer processing anyway and cannot really be used, even when requesting JSON format etc. If someone wants to process data automatically, |
good point, It would be also needed to have the extra columns in the Processed report API output as well. (edited issue) |
Currently when we export a flattened report the CSV output (and others) looks like this:
Instead we would like each individual columns listed like below, with their correct name and value, for all reports combining several levels and exported as flattened with
flat=1
Notes
Label
column for backward compatibility.Why is this important? having the components of the
Label
column clearly separated (un-flattened) allows easy data analysis in the spreadsheet or in other data analysis systems. this will also be very helpful for Custom Reports export where the exported report should have all dimensions clearly listed out.The text was updated successfully, but these errors were encountered: