umami
umami copied to clipboard
Exporting Data
I'm not sure if this has been brought up or addressed...
As a feature request, it would be helpful to have an option to export data into a PDF, Excel or CSV format as is possible on Google Analytics. Before I made the switch to Umami from the dark side, I personally exported to PDF quite regularly.
See #310.
PDF is probably a little more involved to do since that requires formatting and presentational operations that would have to be done and are most likely out of scope for what Mike's trying to achieve. Personally, I'd love to see some sort of CSV export, it's a bit of an involved process to dump from the database, then convert that data to CSV just to be able to get it into something else to categorize further or to migrate into other analytics tools.
@highschooldropout what do you mean by PDF? like summarized reports?
It doesn't really make sense to export to CSV because you already own the data. But if you want to, there are database commands that you can run to accomplish this:
https://www.mysqltutorial.org/mysql-export-table-to-csv/
https://www.postgresqltutorial.com/export-postgresql-table-to-csv-file/
@mikecao The exporting of data as seen on screen after a specific report is selected and actively being viewed. Refer to what @noelforte wrote above, though, because that's the difference between what I'm alluding to and what can currently be done by doing an export-to-PDF via a browser.
@mikecao I would think the data export & import feature would also come in handy in the following use cases:
- Back up the analytics periodically. I believe you could do this by backing up the database as well, but that is probably not easy enough for everyone.
- Move the analytics from one instance of umami to another. This would be a case where we are upgrading to Umami with breaking changes and also to support no downtime. When upgrading to a version with breaking changes, folks could install a new version - point the DNS to a new instance - then import the historical data from the older instance.
- Move into Umami from a different analytics solution and still keep the historical data as long as the import format is maintained.
Since umami is a self-hosted application, I think exporting & importing is more of a db operation that a feature. Still, we need some guidance on how to create a SQL file that is capable of adding analytics data from other services.
P.S. I really think this issue should be called "Importing data" :p
This would be very useful as a classic JSON file to also migrate form PostgreSQL to MySQL or vice versa :)
Hi @mikecao I don’t know if you already have documentation to move from PostGreSQL to MySQL but here is what I’ve made to do it. Hope it helps! https://blog.thelazyfox.xyz/script-factory/migrate-umami-from-postgresql-to-mysql/