# Force Variants

{% embed url="<https://www.youtube.com/watch?v=mgwvqfLqots>" %}

<figure><img src="/files/I14uuvShb81q5unTvOhk" alt=""><figcaption></figcaption></figure>

The Force Variant feature lets you send users to a specific variant directly using a URL parameter. This is useful when you want a controlled group of users (like ad traffic) to always see the same version of a test.

***

### Common use cases

* A/B testing multiple ad campaigns with fixed landing page content
* Running a demo or client presentation that always shows a specific variant
* QA and debugging specific variant setups

***

### How it works

To force a variant, Optibase uses a special URL parameter:

```
optibaseVariants=test_id:variant_id
```

When a user visits a page with this parameter in the URL, Optibase will:

* Bypass random variant selection
* Show the specified variant
* Maintain this variant for the user for the duration of the session

***

### How to generate a Force Variant URL

1. Go to the Variants tab inside your test in the Optibase dashboard
2. Click the Preview / Force icon next to the variant you want to force
3. A modal will appear with two options:
   * Preview: Opens the URL for manual testing
   * Force: Generates a link with the variant forced via query param
4. Enter the URL where the test will run
5. Click Copy to copy the full forced URL

Example URL:

```
https://example.com?optibaseVariants=header_text:variant_b
```

When users visit this link, they will be shown variant\_b of the header\_text test.

***

### Forcing multiple variants

You can force multiple variants from different tests by chaining them using a semicolon:

```
optibaseVariants=header_text:variant_b;footer_cta:variant_a
```

Each test\_id:variant\_id pair should be separated with ;.

***

### Notes

* Force Variant overrides random selection but only applies during that session
* This does not affect test data or variant assignment for other users
* Users who receive a forced variant still count as Tested Users and trigger conversions as normal


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.optibase.io/features/tests/force-variants.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
