# Force Variants

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

<figure><img src="https://2665225050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvnlQY2elcSlIpeLEpEAd%2Fuploads%2FduZ6qmMLB8OwhQC6BLlC%2Fpreview%3Aforce.gif?alt=media&#x26;token=c9f75a0e-5cec-4e79-b1dd-d97f0e253dd3" 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
