e uma coisa destas?
https://github.com/zevarito/mixpanel/wiki/Disable-Mixpanel-tracking-in-desired-environments-with-Rails