Inside Mixpanel

Debugging Javascript API requests

Suhail Doshi

We’ve noticed it can be a bit of a pain to debug javascript requests since we
send them out base64’d. We’ve exposed a new way to debug and it’s simple:

mpmetrics.set_config({debug: true});

You can set our Javascript file in debug mode and it will print out the
request data structure to help see requests actually go out in firebug’s
console. You can see an example output in the picture.

If you forget to set debug to false in production, no need to worry because we
do checking to make sure the console object exists before using it.

Screen_shot_2010-10-13_at_11

Get the latest from Mixpanel
This field is required.