A way to ease your integration with Mixpanel while we’re working
PostedA common problem we see with integrating Mixpanel with your website is that sometimes we’re back logged / delayed with data because we’re dealing with a performance problem or we’re performing maintanence which makes it hard to test to make sure Mixpanel is actually logging your data or if your funnels are integrated properly.
Today we’re fixing that. We made an update to our API specification that changes how the “test” parameter works. Previously, if you specified test=1 we accept your data but do not actually analyze it so it would not show up on your report. It was simply to “fake” logging data to us however we’ve decided to use it for something more useful: Any data that comes in with the test=1 addition will be placed in a high priority queue that gets analyzed just for developers who are testing integration with Mixpanel. This queue will be rate limited so if you send too much data in a given hour we will reject it.
If you’re using our javascript library you can simply do: mpmetrics.set_config({‘test’: 1}); while your developing. Just remember to set it back to 0 in production. You will have to update your javascript library to get this functionality if you’re hosting the library yourself: http://api.mixpanel.com/site_media/js/api/mixpanel.js
Please note this is a URL param not a property, so if you’re making API calls outside of the js lib make sure you append an &test=1 to the end of your URL.
Update: If you are using our asynchronous library you simply do mpq.push(['set_config', {'test': true}])
Data is not analyzed any differently using test=1 it’s simply just placed in a rate-limited priority queue.
Good luck integrating and remember you can always email us at support@mixpanel.com any time if you have a question.
I’ve been having this problem in spades the last few weeks while trying to instrument our application with Mixpanel, so this looks like a huge step in the right direction. Unfortunately, as best I can tell from the source in mixpanel.js, there’s no way to specify this through the Javascript API?
@josephruscio We just updated our Javascript library to make this work. I also updated the blog post so check it out again.
Awesome! Testing logging is just as important as testing code; this will help a lot in ensuring that logging data is accurate and meaningful long before code ever hits production. Nice update Suhail! I’ll be trying this out in the next few days…
Hey guys – make sure you make test=1 a URL parameter and not a property.
How do we do this with PHP?
Can you please make a “Status” page so we know whether you are undergoing maintenance or are backlogged right now?
With your PHP lib just append &test=1 as a query parameter when sending out a request.
How does one do this for iPhone?
Suhail: Do you have guidance for what to specify to enter test mode using the iOS SDK, per the question from dstys? Thanks in advance. I’m excited to get started!
Following up for other readers here; I asked this question as I just started with Mixpanel hours ago, but in reading some of the dev blog, it looks like there’s a data reset option. So, in my case, I’m not going to be too concerned about skewing my metrics with development / test events; I’ll just reset them when I go live.Certainly, post launch, I’ll need an answer to this question. Is there a developer forum where a discussion is taking place?
To test under the iPhone, you’ll have to append &test=1 to the request being made. Unfortunately, the iPhone SDK doesn’t appear to have a simple enable test mode like the Android library does. We’ll have to update it at some point.No developer forum but we have comments enabled on all doc pages where you speak your mind about questions you might have for now.