---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://yandex.com/support/varioqub/en/create/conditions.md
  - https://yandex.com/support/varioqub/ru/create/conditions.md
  - https://yandex.com/support/varioqub/tr/create/conditions.md
  - href: en/create/conditions.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/varioqub/en/llms.txt

# Conditions

By default, experiments are only limited in time. You can add rules to further restrict your experiment's conditions:

:   [Duration](#duration)
    [Audience share](#audience)
    [Pages included in experiment](#pages)
    [GET parameters](#gets)
    [Region](#region)
    [Platform](#platform)
    [Custom parameters](#custom)
    [Without web crawlers](#robots)
    [Targeting](#targeting)



{% note info %}

To apply conditions to your experiment:
1. In Yandex Metrica, go to **Varioqub** → **Experiments** → **Create experiment**.
1. Select the desired condition.

{% endnote %}

## Duration {#duration}

The experiment duration can range from 1 to 90 days. When the end date is reached, the experiment stops automatically. You can stop it manually at any time:

1. Go to **Experiments**.

1. Open the menu next to the experiment and click **Stop**.

    ![](../_assets/on-off.png =750x)

## Audience share {#audience}

By default, the experiment targets 100% of your site audience. You can specify a percentage (from 1% to 100%) of the total audience, which will be evenly divided across all samples. Choose the percentage based on your site's traffic.

## Pages included in experiment {#pages}

Specify the domain of the website and URL path without the protocol (`http`/`https`) and `hash` (the `#` character in the URL and the value after it). For example, to limit the experiment to the home page of your site, specify `example.com`. Use special operators to set flexible conditions. The period (`.`) isn't considered an operator.

<!-- source: en/_includes/personality/or-operators.md -->
To have multiple conditions in one string, use the “AND”/“OR” operators.
<!-- endsource: en/_includes/personality/or-operators.md -->

<!-- source: en/_includes/personality/example-operators.md -->
| **Examples of operator use** | **What is included in the experiment** |
|---------------------------------|--------------------------------|
| `example.com*`                  | All pages of the domain.           |
| `example.*`                    | All pages of all the domains starting with `example`. |
| `example.com/*search*`          | All site pages that include `search` in their URLs. |
| `example.com/search?`         | Page URLs with either no characters or a single character at the end of the string. For example: `example.com/search, example.com/search/, example.com/search2`. |
| `example.com/search+`           | Page URLs with one or more characters at the end of the string. For example: `example.com/search/, example.com/search2, example.com/search_goods`. |
<!-- endsource: en/_includes/personality/example-operators.md -->

{% cut "More information about the URL structure" %}

`https://<host>/<path>?<params>#<fragment>`

- `<host>`: Site domain.

- `<path>`: Path that can have a hierarchical structure. The structure is organized using slashes (“/”).

- `<params>`: Block of parameters separated from the path by a question mark “?”. These parameters are also called GET parameters.

- `<fragment>`: A string with arbitrary content. Separated from GET parameters by “#” (the hash symbol). Not used in the **Pages included in experiment** conditions.

{% endcut %}

## GET parameters {#gets}

If you want to run the experiment only on some pages of your site, specify the GET parameters that are used or not used in their URLs. Use special operators to set flexible conditions. The period (`.`) isn't considered an operator.

<!-- source: en/_includes/create/get.md -->
To apply multiple conditions in Varioqub, separate them with commas: `aparam=avalue,bparam=bvalue` (the conditions are joined by a logical AND). Condition blocks are combined by the OR operator.

Here are the characters you can use with parameters and their values:

- `=` — Placed between the parameter name and its value. If absent, only the parameter's presence is taken into account. Example: `param=value`
- `?` — Means any character that occurs zero or one time. Example: `pa?am=va?ue`
- `*` — Means any characters that occur zero or several times. Example: `p*m=v*e`
- `+` — Means any characters that occur one or several times. Example: `p+m=v+e`
- `!` — Means negation of a condition or exclusion of a parameter from influencing the experiment. Example: `!param=val`

{% note warning %}

Negation `!` must be placed **as the first** character in a key.

- <span style="color:green;">Correct example:</span> `!param=value`.
- <span style="color:red;">Incorrect examples:</span> `param!=value` or `param=!value`.

{% endnote %}

#### Examples

#|
|| **Usage example** | **What is included in the experiment** ||
|| `param` | Only the presence of the parameter, regardless of its value. ||
|| `param=value` | Presence of the exact parameter name and its exact value. ||
|| `!param` | Absence of a given parameter with any value. ||
|| `*param*=value` | All parameters containing the `param` fragment with the given `value`. ||
|| `!*param*=value` | The value of any parameter with the `param` fragment mustn't equal `value`. ||
|| `!*param*=*value*` | The value of any parameter with the `param` fragment shouldn't contain `value`. ||
|| `!*param*` | Absence of a parameter containing the `param` fragment. ||
|#
<!-- endsource: en/_includes/create/get.md -->

## Region {#region}

The region is determined by the IP address of the site user.

**Possible values**:

{% cut "Russia" %}

- Moscow
- Moscow and the Moscow region
- Belgorod region
- Bryansk region
- Vladimir region
- Voronezh region
- Ivanovo region
- Kaluga region
- Kostroma region
- Kursk region
- Lipetsk region
- Oryol region
- Ryazan region
- Smolensk region
- Tambov region
- Tver region
- Tula region
- Yaroslavl region
- Saint Petersburg and the Leningrad region
- Arkhangelsk region
- Vologda region
- Kaliningrad region
- Murmansk region
- Novgorod region
- Pskov region
- Republic of Karelia
- Komi Republic
- Kirov region
- Nizhniy Novgorod region
- Orenburg region
- Penza region
- Perm Territory
- Republic of Bashkortostan
- Republic of Mari El
- Republic of Mordovia
- Republic of Tatarstan
- Samara region
- Saratov region
- Udmurtian Republic
- Ulyanovsk region
- Chuvash Republic
- Astrakhan region
- Volgograd region
- Krasnodar Territory
- Republic of Adygea
- Republic of Kalmykia
- Rostov region
- Altai Territory
- Irkutsk region
- Kemerovo region (Kuzbass)
- Krasnoyarsk Territory
- Novosibirsk region
- Omsk region
- Republic of Altai
- Republic of Tuva
- Republic of Khakassia
- Tomsk region
- Amur region
- Jewish Autonomous Region
- Trans-Baikal Territory
- Kamchatka Territory
- Magadan region
- Primorye Territory
- Republic of Buryatia
- Republic of Sakha (Yakutia)
- Sakhalin region
- Khabarovsk Territory
- Alushta
- Armyansk
- Bakhchisarayskiy District
- Dzhankoy
- Yevpatoriya
- Kerch
- Krasnoperekopsk
- Leninsky District
- Saki
- Sevastopol
- Simferopol
- Sudak
- Feodosia
- Yalta
- Kabardino-Balkarian Republic
- Karachayevo-Circassian Republic
- Republic of Daghestan
- Republic of Ingushetia
- Republic of Crimea
- Republic of Severnaya Ossetia–Alania
- Stavropol Territory
- Chechen Republic
- Kurgan region
- Sverdlovsk region
- Tyumen region
- Khanty-Mansi Autonomous Area (Yugra)
- Chelyabinsk region
- Yamalo-Nenets Autonomous Area
- Nenets Autonomous Area

{% endcut %}


{% cut "CIS" %}

- Abkhazia
- Azerbaijan
- Armenia
- Belarus
- Kazakhstan
- Kyrgyzstan
- Moldova
- Tajikistan
- Turkmenistan
- Uzbekistan
- South Ossetia

{% endcut %}


{% cut "Europe" %}

- Austria
- Belgium
- Bulgaria
- United Kingdom
- Hungary
- Germany
- Greece
- Denmark
- Spain
- Italy
- Cyprus
- Lithuania
- Netherlands
- Norway
- Poland
- Portugal
- Romania
- Serbia
- Slovakia
- Slovenia
- Türkiye
- Finland
- France
- Croatia
- Montenegro
- Czechia
- Switzerland
- Sweden

{% endcut %}


{% cut "Asia" %}

- Bahrain
- Vietnam
- Georgia
- Israel
- India
- Indonesia
- Jordan
- Yemen
- Cambodia
- Qatar
- China
- Kuwait
- Malaysia
- United Arab Emirates
- Oman
- Saudi Arabia
- Singapore
- Thailand
- Taiwan
- Philippines
- South Korea
- Japan

{% endcut %}


{% cut "North America" %}

- Guatemala
- Dominican Republic
- Canada
- United States of America
- Mexico

{% endcut %}


{% cut "South America" %}

- Argentina
- Brazil
- Colombia
- Peru
- Uruguay
- Chile

{% endcut %}


{% cut "Africa" %}

- Egypt
- Côte d'Ivoire

{% endcut %}


{% cut "Australia and Oceania" %}

- Australia
- New Zealand

{% endcut %}

You can also use the "Exclude selected regions" toggle to invert your selection, removing the chosen regions from the experiment.

## Platform {#platform}

Smartphones, tablets, desktop devices (PCs), TVs. The device type of a site user is identified by their User-Agent. To find out from which devices people are most likely to visit your site, see the [Devices](https://yandex.com/support/metrica/en/technologies/devices.html) report in Yandex Metrica.

## Custom parameters {#custom}

<!-- source: en/_includes/paid-feature.md -->
{% note info %}

Only available in the [Varioqub extended version](https://yandex.com/support/varioqub/en/paid-functionality.md).

{% endnote %}
<!-- endsource: en/_includes/paid-feature.md -->

To apply this condition, implement parameter transmission on your site. For example, to send parameters that help profile your users. For example, by indicating that they're an important customer, have registered on your site, and so on.

After that, specify these parameters and their values in the **Custom values** field so that Varioqub can recognize and use them during the experiment.

<!-- source: en/_includes/create/get.md -->
To apply multiple conditions in Varioqub, separate them with commas: `aparam=avalue,bparam=bvalue` (the conditions are joined by a logical AND). Condition blocks are combined by the OR operator.

Here are the characters you can use with parameters and their values:

- `=` — Placed between the parameter name and its value. If absent, only the parameter's presence is taken into account. Example: `param=value`
- `?` — Means any character that occurs zero or one time. Example: `pa?am=va?ue`
- `*` — Means any characters that occur zero or several times. Example: `p*m=v*e`
- `+` — Means any characters that occur one or several times. Example: `p+m=v+e`
- `!` — Means negation of a condition or exclusion of a parameter from influencing the experiment. Example: `!param=val`

{% note warning %}

Negation `!` must be placed **as the first** character in a key.

- <span style="color:green;">Correct example:</span> `!param=value`.
- <span style="color:red;">Incorrect examples:</span> `param!=value` or `param=!value`.

{% endnote %}

#### Examples

#|
|| **Usage example** | **What is included in the experiment** ||
|| `param` | Only the presence of the parameter, regardless of its value. ||
|| `param=value` | Presence of the exact parameter name and its exact value. ||
|| `!param` | Absence of a given parameter with any value. ||
|| `*param*=value` | All parameters containing the `param` fragment with the given `value`. ||
|| `!*param*=value` | The value of any parameter with the `param` fragment mustn't equal `value`. ||
|| `!*param*=*value*` | The value of any parameter with the `param` fragment shouldn't contain `value`. ||
|| `!*param*` | Absence of a parameter containing the `param` fragment. ||
|#
<!-- endsource: en/_includes/create/get.md -->

## Without web crawlers {#robots}

Web crawlers are robots that visit your site for various tasks, such as indexing pages or checking if it's available. Some robots identify themselves, while others try to mimic real users to avoid detection by analytical systems.

When creating an experiment, you can exclude crawlers that have identified themselves (their User-Agent is known) from the experiment's audience. To do this, select the option **Without web crawlers**.

## Targeting {#targeting}

<!-- source: en/_includes/paid-feature.md -->
{% note info %}

Only available in the [Varioqub extended version](https://yandex.com/support/varioqub/en/paid-functionality.md).

{% endnote %}
<!-- endsource: en/_includes/paid-feature.md -->

### Using custom IDs

To run experiments, Varioqub divides site visitors into groups using its own user IDs.

You can also choose to split users using YOUR own, custom user IDs If your service supports them.

To use this condition:

1. Select **Use custom uid for usersplit**.
1. Implement the passing of the GET parameter `cuid` on the site. The value of the parameter needs to correspond to the user ID.

   {% cut "Sample request via the Usersplit API" %}

   ```bash
   GET https://uaas.yandex.ru/v1/exps
     ? [[client_id](*client_id)=<String>]
     & [[url](*url)=<String>]
     & [[i](*i)=<String>]
     & [[client_features](*client_features)=<String>]
     & [[cuid](*cuid)=<String>]
   ```

   {% endcut %}
    
   {% cut "Sample initialization via the JavaScript API" %}

   ```javascript
   ymab({
       clientId: 'metrika.XXXX',
       cuid: <String>,
       callback: callback
   })
   ```

   {% endcut %}

{% note warning %}

The custom ID **must not** be longer than 30 characters. Users with IDs that exceed this length won't be included in the experiment.

{% endnote %}

{% note alert %}

You might see discrepancies between Varioqub and Yandex Metrica reports because Yandex Metrica reports don't support custom IDs.

{% endnote %}

### Adding a list of custom IDs

You can create a list of custom IDs to only apply your experiment to users with the IDs that match the IDs in this list.

To use this feature:
1. Select **Use custom uid for usersplit**.
1. Click **Add a list of custom uids**.
1. Create a new list or select an existing one.

To create a list of IDs:
1. Click **Create list**.
1. Specify a name for your list.
1. Enter the list of IDs separated by commas.
1. Click **Save**.

{% note info %}

Saving a list may take a few minutes.

{% endnote %}

{% note warning "Limitations" %}

- Each list can contain no more than 100,000 IDs.
- The maximum length of an ID is 30 characters.

{% endnote %}

## FAQ and troubleshooting

[I'm trying to create an experiment, but all the fields are locked.](https://yandex.com/support/varioqub/en/faq.md#fields-blocked)

[What if I want to use conditions that are not available in the Varioqub interface?](https://yandex.com/support/varioqub/en/faq.md#custom-condition)

[How do I disable a specific experiment type for an entire site or page?](https://yandex.com/support/varioqub/en/faq.md#disable-experiment-type)

<!-- source: en/_includes/feedback/feedback.md -->
<details>
    <summary class="button">Contact support</summary>
    <div style="padding: 15px;
     margin: 10px 0;
     background: #FFFFFF;
     border-radius: 10px;
     border: 1px solid var(--yc-color-line-generic);">
     <iframe style="background: #FFFFFF;"
        height="700"
        width="100%"
        frameborder="0"
        src="https://forms.yandex.ru/surveys/1705/?iframe=1&lang=en">
    </iframe>
</details>






<!-- endsource: en/_includes/feedback/feedback.md -->

<!-- source: en/_includes/image-styles.md -->

<!-- endsource: en/_includes/image-styles.md -->

[*client_id]: Yandex Metrica user ID. Format: `metrika.{counter_id}`. Where `{counter_id}` is the Yandex Metrica tag ID. [How to find the tag number](https://yandex.com/support/metrica/en/general/tag-id.html)

[*url]: Full URL, including GET parameters, of the page browsed by the user.

If no URL is passed, Varioqub uses the referer from the headers. However, in some cases it may not be possible to send the referer in full or at all. For this reason, we recommend always passing the URL.

[*i]: Site user's ID stored in first-party cookies. Make sure to set it in the `_ymab_param` cookie upon receiving the response. It may be empty during the user's first visit to the site.

We recommend passing it in each API request. The field may be empty in the first request.

[*client_features]: Serialized JSON object containing user parameters. Example: `{"param2": "value2", "param1": "value1"}`.

[*cuid]: A custom ID that allows you to use your own user IDs in experiments.