mixpanel/mixpanel-iphone — pull request #10 by ysoldak (2011-11-08 23:33:03+00:00)
Title: Flag to globally disable events tracking

Can be useful to be able to disable events tracking globally with a single flag.
This patch does exactly this, adds a property "trackEvents" which is checked every time in "track:" method.

The background for this is an app can have a switch (in the settings) so users can disable gathering of (anonymous) usage statistics. That would be nice to avoid wrapping every "track:" method in "if" statements, but set the state for MixpanelAPI just once.