Filter out employee or internal user actions

It’s a good idea to take some steps in your project to differentiate between data sent by your own users and data sent in by employees using (or testing) your product. The approach you take depends largely on the nature of your product and to what extent you’d like to be able to see your employees’ activity vs. your users’ activity.

Continue to collect data, but filter out of reports by email

One way to build reports that exclude employee activity is to filter out People profiles where the Email property contains your company domain.

In Segmentation, select "Email" > "does not contain" > ""


In Insights, follow the same procedure after clicking the "Filter" button:


Have different projects for development and production

Consider creating two separate projects for development and production so that test data doesn’t make its way into your project. After testing and when you're ready to push to production, you can switch the project token from the development project token to the production project token to make sure data goes to the right place. Where can I find my project token?

Ignore Event data for individuals in a single project (web)

If you want to ignore data (i.e., not have it sent to your Mixpanel project) only for specific individuals, those users can type mixpanel.register({"$ignore":true}); in their browser's developer console on the website associated with the project in question.

Mixpanel will reject any Events with the $ignore key regardless of the value (i.e., "$ignore":false will also prevent Mixpanel from collecting events). So to start collecting data again, those individuals should usemixpanel.unregister("$ignore"); .

This method will prevent Mixpanel from from sending data going forward, but it will not remove past Events that were already sent in before this method was implemented.

Ignore Event data for an entire company in a single project

A more scalable solution to ignore data for an entire group is to detect your company's email address programmatically and call mixpanel.register({"$ignore":"true"}); if a user's email contains your company's domain. This can also be done by IP address, detecting IP addresses you’d like to exclude and then calling mixpanel.register({"$ignore":"true"}); if a user’s IP is in the range you’ve identified.

This method can be used with the JavaScriptiOS, and Android libraries as long as the user is logged in to ignore Event data from certain domains across platform.

People data

The $ignore flag only applies to Event data; People Profiles by internal users will still be created and updated if the flag has been added.

If you would like to be able to filter out internal user profiles, you can add a People Property to each internal user's profile (e.g. Internal User: True) either manually via Explore or programmatically upon login.

You can then filter out these internal users by setting a filter of Internal User: False when creating reports.


Find your answer?
5 out of 9 found this helpful



Article is closed for comments.