Hacker News new | ask | show | jobs
by le_isms 5066 days ago
This is a great idea! Do you mind letting us know what your setup's like?
2 comments

We just issue Celery jobs to track events in Mixpanel, so if their API is failing, the jobs fail and get retried later on.

If we get too many messages accumulated in the queue where these jobs go, we just purge it (better lose that data than let RabbitMQ die because of memory exhaustion). Although there have to be a whole damn lot of events there for us to actually notice

Really neat! I might be a newbie to this, but how do you get those client-side javascript function calls over to the serverside? I am assuming the client's browser is running the Mixpanel Javascript and that your events are serverside.
Yep, like rprime said, we're sending tracking events from the server (let me plug http://libsaas.net here).

So instead of using mixpanel.track from Javascript, you do an AJAX call to your own server and schedule a Celery job there.

There's an issue with passing Mixpanel's super properties to your server-side handler, but that's the general idea.

Gotcha, I'm going to have to try this, thanks for the insight!
I think he is not talking about the javascript events. Probably they fire the events in the backend. [1]

[1] https://mixpanel.com/docs/integration-libraries/

I mentioned it in an answer to a different post in this thread. The short answer is I use Redis via Resque.