Solved

Mixpanel data export in Excel

  • 3 October 2018
  • 5 replies
  • 173 views

Userlevel 1
Badge

Hi Mixpanel Community,

I have a regular requirement from Mixpanel users in my company : They would like to export and update Mixpanel data in Excel. They use excel dashboards where they gather multiple sources of data (and among them mixpanel) and what I provided to them for the moment is a list of multiple reports they have to "csv export" every week to update their excel dashboard, with a lot of copy/paste and manual work.

It's quite time consuming and I'm looking for some way to automate the process as much as possible. Does anyone know a way to export / update multiple mixpanel reports in an Excel file ? Like a plugin or a way to call the API directly in excel ? Or a way to directly export a dashboard from mixpanel ?


icon

Best answer by michaelsuiter 3 October 2018, 23:30

hey @pierre,

i'm with @linda.kim on the cron job, and can speak more to the excel part. if i were you, i would set up a master excel doc that is just your dashboard visualizations, and then house your data sets in external excel sheets that get refreshed by the cron job.

for instance, i would have an excel doc called "dashboards" that would built visualizations from a data set that has a pathway to a different excel doc called "mixpanel_data". then you could use this cron job script idea from @linda.kim answer, and return a csv file called "mixpanel_data". when that data gets refreshed it will overwrite the old data set (as long as it's called the same thing and in the same directory), and as long as that pathway is still good it will update your visualizations in the "dashboards" doc.

does this make sense? if this works could make it a pretty automated process


View original

5 replies

Userlevel 3
Badge

Hi @pierre,

I had the same thing as well - I wrote an export script (looking at this article) which exports it as a CSV and then created a cron job that runs the script daily. Not sure about sending it to Excel directly though.


Userlevel 3
Badge

hey @pierre,

i'm with @linda.kim on the cron job, and can speak more to the excel part. if i were you, i would set up a master excel doc that is just your dashboard visualizations, and then house your data sets in external excel sheets that get refreshed by the cron job.

for instance, i would have an excel doc called "dashboards" that would built visualizations from a data set that has a pathway to a different excel doc called "mixpanel_data". then you could use this cron job script idea from @linda.kim answer, and return a csv file called "mixpanel_data". when that data gets refreshed it will overwrite the old data set (as long as it's called the same thing and in the same directory), and as long as that pathway is still good it will update your visualizations in the "dashboards" doc.

does this make sense? if this works could make it a pretty automated process


Userlevel 1
Badge

Thanks a lot @linda.kim & @michael.suiter, I started digging into this solution and it seems promising 🙂

Seems like currently there is no built-in function to request aggregated/formatted data in the module, Am I right ? Or only through jql queries, and in that case did you find a way to format the jql query result in .csv ?


Userlevel 3
Badge

would their formatted exports work for this? https://mixpanel.com/help/reference/data-export-api


Userlevel 3
Badge

@pierre oh! looks like their query_jql method does let you designate the output to csv with the param format='csv'

https://github.com/mixpanel/mixpanel_api/blob/master/__init__.py#L710-L734

i think that should do it!


Reply