> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-4b2ff144-devin-1763168466-llm-docs-audit.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 in the following example

  <Frame>
    <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/qmCYUP30zjsqtIHB/images/dynamic-config/add-rule/129112226-51978083-d007-4697-88b5-f3a080eabf48.png?fit=max&auto=format&n=qmCYUP30zjsqtIHB&q=85&s=35a9054cc5f4a063343594a22064d242" 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 in the following example

  <Frame>
    <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/qmCYUP30zjsqtIHB/images/dynamic-config/add-rule/129112427-27351aaf-074e-4997-91d8-6e1e7941b991.png?fit=max&auto=format&n=qmCYUP30zjsqtIHB&q=85&s=18e0abdfa1f52cdc63ceffb97690b47b" 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 flag as shown in the following example; this ensures that the dynamic config is activated only for users who're exposed to the target feature flag

  <Frame>
    <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/qmCYUP30zjsqtIHB/images/dynamic-config/add-rule/129112612-d881981c-4fc6-4e95-a9c5-18319c02d6f2.png?fit=max&auto=format&n=qmCYUP30zjsqtIHB&q=85&s=7ff97ea09458f68181211acb3fbaca07" alt="Feature Flag 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-devin-1763168466-llm-docs-audit/qmCYUP30zjsqtIHB/images/dynamic-config/add-rule/129113189-30e7e7da-7559-4d3a-8bd3-74a6ccb7afe2.png?fit=max&auto=format&n=qmCYUP30zjsqtIHB&q=85&s=8f0bd90f094e14449ac939b58c8cb572" alt="JSON configuration editor interface" width="600" height="536" data-path="images/dynamic-config/add-rule/129113189-30e7e7da-7559-4d3a-8bd3-74a6ccb7afe2.png" />
</Frame>
