---
title: Adding Rules
description: Learn how to add targeting rules to dynamic configs to control which users receive specific configurations
product: general
token_estimate: 477
---
# Adding Rules

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Add a rule to a dynamic config

Targeting rules control which users receive a specific configuration from a dynamic config. To add new user targeting rules to a dynamic config,

- Log into the Statsig console at https://console.statsig.com
- On the left-hand navigation panel, select **Dynamic Configs**
- Select the dynamic config where you want to add a rule
- Click the **Add Targeting** button
- Click the **Add New Rule** button
- Select the criteria for identifying the users you want to target:

  - You can target users based on common attributes such as their operating system as shown below.

  ![Operating system targeting rule configuration](https://docs.statsig.com/images/dynamic-config/add-rule/129112226-51978083-d007-4697-88b5-f3a080eabf48.png)

  - You can target users in a defined [segment](https://docs.statsig.com/segments/overview) as shown below.

  ![User segment targeting rule configuration](https://docs.statsig.com/images/dynamic-config/add-rule/129112427-27351aaf-074e-4997-91d8-6e1e7941b991.png)

  - You can target users who are eligible for a specific feature gate. Targeting by feature gate ensures Statsig activates the dynamic config only for users exposed to the target feature gate.

  ![Feature gate targeting rule configuration](https://docs.statsig.com/images/dynamic-config/add-rule/129112612-d881981c-4fc6-4e95-a9c5-18319c02d6f2.png)
- To complete the dynamic config, select the **Edit** link to open the JSON configuration editor. Type the configuration parameters and values that your application should receive, then select **Confirm**.

![JSON configuration editor interface](https://docs.statsig.com/images/dynamic-config/add-rule/129113189-30e7e7da-7559-4d3a-8bd3-74a6ccb7afe2.png)

