> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-4b2ff144-mintlify-add-local-eval-country-note-96362.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Rules

> Learn how to add targeting rules to dynamic configs to control which users receive specific configurations

## Add a rule to a dynamic config

To add new user targeting rules to a dynamic config,

* Log into the Statsig console at [https://console.statsig.com](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

  <Frame>
    <img src="https://mintcdn.com/statsig-4b2ff144-mintlify-add-local-eval-country-note-96362/OvklmI85KotdUh_-/images/dynamic-config/add-rule/129112226-51978083-d007-4697-88b5-f3a080eabf48.png?fit=max&auto=format&n=OvklmI85KotdUh_-&q=85&s=e939165599e903926768c95cfdb9ae0e" alt="Operating system targeting rule configuration" width="500" height="448" data-path="images/dynamic-config/add-rule/129112226-51978083-d007-4697-88b5-f3a080eabf48.png" />
  </Frame>

  * You can target users in a defined [segment](/segments) as shown below

  <Frame>
    <img src="https://mintcdn.com/statsig-4b2ff144-mintlify-add-local-eval-country-note-96362/OvklmI85KotdUh_-/images/dynamic-config/add-rule/129112427-27351aaf-074e-4997-91d8-6e1e7941b991.png?fit=max&auto=format&n=OvklmI85KotdUh_-&q=85&s=7b53bb007d8b91dd70a06bfebeb2083f" alt="User segment targeting rule configuration" width="500" height="446" data-path="images/dynamic-config/add-rule/129112427-27351aaf-074e-4997-91d8-6e1e7941b991.png" />
  </Frame>

  * You can target users who are eligible for a specific feature gate as shown below; this ensures that the dynamic config is activated only for users who're exposed to the target feature gate

  <Frame>
    <img src="https://mintcdn.com/statsig-4b2ff144-mintlify-add-local-eval-country-note-96362/OvklmI85KotdUh_-/images/dynamic-config/add-rule/129112612-d881981c-4fc6-4e95-a9c5-18319c02d6f2.png?fit=max&auto=format&n=OvklmI85KotdUh_-&q=85&s=85874c97bb7f127f615f300b4d90377d" alt="Feature gate targeting rule configuration" width="498" height="448" data-path="images/dynamic-config/add-rule/129112612-d881981c-4fc6-4e95-a9c5-18319c02d6f2.png" />
  </Frame>

* To complete the dynamic config, click on the **Edit** link to open the JSON configuration editor. In the editor, type the configuration parameters and values that your application should receive and click **Confirm**

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-mintlify-add-local-eval-country-note-96362/OvklmI85KotdUh_-/images/dynamic-config/add-rule/129113189-30e7e7da-7559-4d3a-8bd3-74a6ccb7afe2.png?fit=max&auto=format&n=OvklmI85KotdUh_-&q=85&s=4370621f07799504a41db908cd3edc79" alt="JSON configuration editor interface" width="600" height="536" data-path="images/dynamic-config/add-rule/129113189-30e7e7da-7559-4d3a-8bd3-74a6ccb7afe2.png" />
</Frame>
