I\'m not able to connect to mixpanel.
I have tried with a correct api_key and api_secret, like this:
from the documentation:
We do not have a JS client library, but we have implemented jsonp on the API backend. See the Wikipedia article for a brief overview. Our jsonp parameter is 'callback'. This parameter will not be used during signature calculation.
https://mixpanel.com/docs/api-documentation/data-export-api#libs-js
Assuming you calculate the signature correctly, the below example will work:
$.getJSON('http://mixpanel.com/api/2.0/segmentation/?callback=?', {
event: event,
from_date: from_date,
to_date: to_date,
expire: expire,
sig: sig,
api_key: api_key
}, function (result) {
alert(result);
});