I'm getting different numbers in Mixpanel's dashboard and Data Export API.
In the dashboard on the segmentation tab, I've selected an event ("login"), start and end dates (Sept 17th and 24th), and the week unit. It shows a graph, and a table with four values, for this week, Sept 17th, Sept 10th and Sept 3rd.
I make this call to the Mixpanel API using the Python library:
api = Mixpanel(
api_key = '----',
api_secret = '----'
)
data = api.request(['segmentation'], {
'event': 'login',
'unit': 'week',
'from_date': '2012-09-17',
'to_date': '2012-09-24'
})
print json.dumps(data)
Here's the data it returns:
{
"legend_size": 1,
"data": {
"series": [
"2012-09-17",
"2012-09-24"
],
"values": {
"login": {
"2012-09-17": XXXXX,
"2012-09-24": YYYYY
}
}
}
}
The value XXXXX is different to the value shown in the web dashboard, why is this?
The API is returning a value for Sept 24th which isn't in the dashboard view. The dashboard shows values for Sept 3rd and 10th which aren't in the API. Why is this happening?
How can I ensure the results are consistent between the two interfaces for the same date range?