> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpanel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Rules

> Set rules in Lexicon that keep incoming data consistent, accurate, and trustworthy, including data standards, event approval, and bot management

Data Rules are rules you set to keep incoming data consistent, accurate, and trustworthy. To open Data Rules, go to **Lexicon** → **Data Governance** → **Data Rules**.

Data Rules has three rulesets, each on its own card:

| Ruleset | What it does |
| - | - |
| [Data standards](#data-standards) | Sets standards for your event metadata. Lexicon flags events that don't meet them. |
| [Event approval](#event-approval) | Controls the visibility of newly added events. |
| [Bot management](#bot-management) | Keeps automated traffic out of your project data. |

After you change a ruleset, click **Save Changes** to apply it.

> [!NOTE]
>
> Customers on an Enterprise plan can access the Data Standards and Event Approval features. See our [pricing page](https://mixpanel.com/pricing/) for more details.

## Data standards

Data standards check your event metadata against rules you set, and Lexicon flags the events that don't meet them. You can require:

* A naming convention, such as camelCase or snake\_case, or a custom regular expression
* A description
* An owner
* An image

The card shows a banner with the percentage of events that fail your standards. The banner links to the Events view in Lexicon, filtered to those events.

Project Owners and Admins can edit data standards. For each rule and how compliance appears in Lexicon, see [Data Standards](https://docs.mixpanel.com/docs/data-governance/data-standards.md).

## Event approval

Event approval hides newly added events until a Project Owner or Admin reviews them. On the **Event approval** card, you can:

* Turn event approval on or off
* Auto-approve new events that meet your data standards
* Choose the Slack channel and email recipients to notify about new events
* Turn on notifications for new properties

Project Owners and Admins can edit event approval. For how to review new events, see [Event Approval](https://docs.mixpanel.com/docs/data-governance/event-approval.md).

## Bot management

Bot management keeps automated traffic out of your project data. When you turn on **Drop bot traffic**, Mixpanel drops every event whose Actor Type (`$mp_actor_type`) is `bot`.

Events whose Actor Type is `agent`, such as requests from an LLM acting on behalf of a person, are kept. You can still analyze how AI agents use your product. For how Mixpanel classifies events, see [Identify AI Agent and Bot Traffic](https://docs.mixpanel.com/docs/tracking-best-practices/bot-traffic.md#identify-ai-agent-and-bot-traffic).

> [!NOTE]
>
> If you track server-side, forward your end user's user agent as `$mp_raw_user_agent`. Otherwise, Mixpanel classifies the user agent of your server's HTTP library, and Drop bot traffic may not detect or drop bot events. See [Tracking Browser, Device, and OS](https://docs.mixpanel.com/docs/tracking-best-practices/server-side-best-practices.md#tracking-browser-device-and-os).

> [!WARNING]
>
> Dropped events aren't stored and can't be recovered.

### How Drop bot traffic works

* **It applies to new data only.** Mixpanel drops bot events at ingestion, right after it classifies them. Events already in your project aren't removed. To exclude bot events you've already ingested, filter your reports on Actor Type is not `bot`.
* **It's separate from Drop Filters.** Drop bot traffic doesn't appear in your list of [Drop Filters](https://docs.mixpanel.com/docs/data-governance/data-clean-up.md#3-drop-filters) and doesn't count toward the drop filter limit. You manage it only from the **Bot management** card.

### Turn on Drop bot traffic

Only project Owners can turn on Drop bot traffic.

1. Open **Lexicon**.
2. Go to **Data Governance** → **Data Rules**.
3. On the **Bot management** card, turn on **Drop bot traffic**.
4. Click **Save Changes**.

Mixpanel drops bot events ingested after you save. To stop dropping bot traffic, turn off **Drop bot traffic** and click **Save Changes**.


## Related topics

- [Data Standards](https://docs.mixpanel.com/docs/data-governance/data-standards.md)
- [Event Approval](https://docs.mixpanel.com/docs/data-governance/event-approval.md)
- [Block Unwanted Traffic](https://docs.mixpanel.com/docs/tracking-best-practices/bot-traffic.md)
- [Data Clean-Up](https://docs.mixpanel.com/docs/data-governance/data-clean-up.md)
