To keep data clean on Amplitude, we recommend setting up a development project in conjunction with your production project; test data should be sent to the development project only. However, the necessary step of testing your production environment can send internal data into your production project. Because internal user events can falsely inflate your product's metrics, you must block or filter out these events for accurate reporting.
This article will go over different approaches you can take to prevent internal user data from affecting your metrics.
You can block all internal event data originating from your organization's IP address from ingestion into Amplitude Analytics. Your project's Govern page has a data filter that enable you to set up filters for this purpose.
To set up a filter to block events from a specified IP address, follow these steps:
- Open Govern and select the project you wish to filter.
- On the Advanced tab, click Add a data filter.
- Select Events from the Block drop-down menu.
- Choose IP Address and equal to from the two other drop-down menus. Then enter the IP address you wish to block.
- Repeat steps 4 and 5 for each IP address you want to block.
- Click Block.
NOTE: You must be a manager or admin of your organization to add a data filter.
Once you have this filter set up, all events sent from your list of IP addresses will be dropped upon ingestion.
This filter will NOT work if you've modified Amplitude's SDK configurations to prevent the collection of IP addresses. It will only drop events that have a collected IP address string that matches the IPs you've blocked.
Filtering out users
Internal user events can always be segmented out using the Segmentation Module of any Amplitude chart. Simply segment out users by user ID, device ID, Amplitude ID, IP address, or an identifiable user property (e.g. username or email).
Save user segments
You can easily save user segments and pin them to your charts so that you don't need recreate filters every time you want to use them. When you set a saved segment as your default, all new charts you create via the Create Chart or New button will have the default segment automatically applied. The applied filter will then be visible on your chart.
Maintain user lists
Your list of internal users can change over time, and maintaining this list can be time-consuming if your users do not share a common attribute. In these cases, you can take advantage of Amplitude's behavioral cohorts feature and import a cohort of internal users to block on Amplitude.
This cohort can be applied to charts in a similar fashion to user properties. Once you've created a user segment that excludes your internal cohort, save and pin the segment for easy access.
Behavioral cohorts can also be updated programmatically, so your cohort of internal users can be easily maintained. Please check out the Behavioral Cohorts API for more details.