If you're looking to bring data into Geckoboard from Mixpanel that's not natively available in the pre-built Mixpanel data source, you can consider two other methods: using the Mixpanel Google Sheets add-on or a Google Apps Script.
Both options involve bringing the data into a Google Sheet, which allows you to visualize the data using the Spreadsheets data source in Geckoboard.
Use the official Mixpanel Google Sheets add-on
Mixpanel offers an official Google Sheets add-on that allows you to sync data from your Mixpanel account to a Google Sheet.
This allows you to export reports or cohort data from your Mixpanel project and sync the data every hour if preferred. See the official documentation and instructions on how to install in the link above.
Use Google Apps Script
This Google Apps Script allows you to automatically fetch data from Mixpanel and bring it into a Google Sheet. Visit the repo linked above for full steps on how to use it.
Once installed, this script allows you to:
Fetch data for any event and property
Trigger the script at a frequency you specify, such as every minute, you,r or day
Visualizing Mixpanel formulas in your Google Sheet
It's possible to graph Mixpanel formulas using the Spreadsheets data source. Below are some examples and syntax information.
Example formula
formulas=[ { "queries": [ {"events": ["signup"], "count_type": "unique"}, {"events": ["Added User"], "count_type": "unique", "selector": "(properties[\"$os\"] == \"Mac OS X\") and \"y\" in properties[\"billing\"]"}, ], "formula": "(A)/(B)" } ]
Syntax
from_date
to_date
unit
– day, week or monthcount_type
can be general, which means total, unique, or averageselector
is an expression, which you can learn more about from Mixpanel's documentation
If you think of the queries as being labelled A to H (in the order they’re listed), then this is an expression of how to combine them.
There can be up to 4 elements in the numerator and up to 4 in the denominator, and it always looks like (numerator)/(denominator)
– even if there’s only one thing there, e.g., (A)/(B).
The numerator and denominator are any valid mathematical expressions using +
, -
, *
and ()
. For example (A+(B-(C*D))/((E-F)*G+H)
.
The script could also be modified to use these parameters. You’d need to modify line 125 where the root API URL is defined (it’s hard-coded to use the segmentation
endpoint). Then you'd need to modify how it handles the API_PARAMETERS
e.g., line 193, which defines that the request should be sent with:
'event=' + parametersEntry[0], 'where=' + parametersEntry[1], 'type=' + parametersEntry[2], 'unit=' + parametersEntry[3],
Where parametersEntry
is defined as:
var parametersEntry = API_PARAMETERS[sheetName];