Opt out tracking from mobile using HTTP Spec

  • 18 October 2020
  • 2 replies


I know that the doc mentioned about using the opted_out_tracking() function to opt out tracking. But in our mobile app, we’re using HTTP Spec and in the doc, there’s no way to opt out a specific user from getting tracked (e.g internal employees). How do we go about this, please?

2 replies


@cherise any response on this please?

Userlevel 6
Badge +3

@Tenderd —

The reason that we do not have an opt-out method for HTTP Spec is because there isn't a concept of local storage, so there is no place to store a property that says "dont track me" — using HTTP Spec is more or less a list of endpoints and there is no backend endpoint for opting out. 

For your use-case, there are two ways to go about this:

  • You can put a condition in your track calls to eliminate internal employees using an if statement or something similar (similar to the methods described below)
  • You can use data views 
  • and apply global filters to your dashboards

For GDPR and Opting users out of tracking, I recommend this resource:

  • The exact conditions under which data is sent to Mixpanel server-side is custom configured by the developer of a server side implementation. Controlling an end user’s opt-out state must be built into the tracking logic. The implementation developer should configure Mixpanel data collection methods so that they run only when data should be sent to Mixpanel.