I need to use mixpanel Data Export API using jQuery.
According to this: How can I use mixpanel API? and according to mixpanel: https://mixpanel.com/docs/api-documentation/data-export-api#libs-js, I can use this:
$.getJSON('http://mixpanel.com/api/2.0/engage/?callback=?', {
api_key: apiKey,
expire: expire,
sig: sig
},
function (result) {
alert(result);
}
);
But as a result I get an error as result:
"unknown param: callback
for params: {'callback': 'jQuery18208090281161325954_1358248117308', 'project_id': 160130}"
I know that the url and my data is correct since when I open browser in http://mixpanel.com/api/2.0/engage/?api_key=...&expire=...&sig=...
I get correct data.
What is wrong with my code?