# URL parameters

URL: https://docs.ablyft.com/developers/reference/url-parameters/

> Parameters in the page URL that the snippet reads, with format, effect and examples.



The snippet reads a few parameters from the URL of the current page. All names start with `ablyft_`. You use them to
preview variations, to switch debug output on, to opt out, and to hand a variation assignment from one domain to another.

| Parameter                                                                                                                                                | Value                                       | Purpose                                                 |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------- |
| [`ablyft_preview`](#ablyft_preview)                                                                                                                      | `experimentId_variationId`, comma separated | Show specific variations                                |
| [`ablyft_exclude_running`](#ablyft_exclude_running)                                                                                                      | `true` or `false`                           | Hide or keep other running experiments during a preview |
| [`ablyft_set_bucketing`](#ablyft_set_bucketing)                                                                                                          | JSON list of `"experimentId_variationId"`   | Set the visitor's assignments                           |
| [`ablyft_show_debug`](#ablyft_show_debug)                                                                                                                | `true`                                      | Show debug output when debug mode is restricted         |
| [`ablyft_opt_out`](#ablyft_opt_out)                                                                                                                      | `true` or `false`                           | Exclude the browser from ABlyft                         |
| [`ablyft_check`](#ablyft_check)                                                                                                                          | `true`                                      | Check that the snippet is installed                     |
| [`ablyft_qa_token`](#ablyft_qa_token)                                                                                                                    | Token                                       | Start the quality assurance tool                        |
| [`ablyft_editor_variation`](#ablyft_editor_variation-and-ablyft_editor_token), [`ablyft_editor_token`](#ablyft_editor_variation-and-ablyft_editor_token) | Variation ID, token                         | Open the Visual Editor                                  |

> Parameters are matched by exact name. The prefix `ablyft_` is fixed, except for `ablyft_set_bucketing`, whose name you can
> change in the project settings.

## ablyft_preview

Shows the given variations in your browser, for the rest of the browser tab session. The value is a comma separated
list of `experimentId_variationId` pairs.

```text
https://www.example.com/product?ablyft_preview=12345678_87654321
https://www.example.com/product?ablyft_preview=12345678_87654321,23456789_98765432
```

Good to know:

* The setting is remembered in the tab (`sessionStorage`), so it stays active when you navigate on the site.
* In preview mode, **goals are not counted**.
* Experiments in **Preview** status run only in browsers that selected one of their variations with this parameter.
* The parameter is ignored when ABlyft compares the URL with your [pages](https://docs.ablyft.com/guides/audiences-and-delivery/pages/), so it does not change targeting.

You normally do not build these links by hand: ABlyft creates them in the experiment's preview mode, see
[Preview and QA](https://docs.ablyft.com/guides/experiments/preview-and-qa/).

## ablyft_exclude_running

Controls what happens to your other, running experiments while you preview.

| Value   | Effect                                                                               |
| ------- | ------------------------------------------------------------------------------------ |
| `true`  | In preview mode, running experiments that you did not select are not shown (default) |
| `false` | Running experiments behave as usual                                                  |

ABlyft adds `ablyft_exclude_running=false` to the preview link when you switch off **Exclude other running experiments**.

```text
https://www.example.com/product?ablyft_preview=12345678_87654321&ablyft_exclude_running=false
```

The choice is stored for the tab session. Other values are ignored.

## ablyft_set_bucketing

Assigns the visitor to variations, without a preview. The value is a JSON list of `"experimentId_variationId"` strings. The
snippet merges it into the visitor's stored assignments (`ablyft_exps`); entries for the same experiment are overwritten.

```text
https://www.example.com/?ablyft_set_bucketing=["12345678_87654321","23456789_98765432"]
```

In a real link, encode the value: `?ablyft_set_bucketing=%5B%2212345678_87654321%22%5D`.

This is how a variation assignment is handed over to another domain, for example from your shop to a separate checkout domain:

1. In **Settings → Project Settings**, enter the other domain under **External tracking domains**.
2. ABlyft adds the parameter to links that point to this domain.
3. On the target site, the snippet reads the parameter and keeps the visitor in the same variation.

The parameter name is `ablyft_set_bucketing` by default. You can change it in **Bucketing handover query parameter** (same settings).

To build the value for the current visitor yourself, use [`getSetBucketingUrlExtension()`](https://docs.ablyft.com/developers/reference/javascript-api/tools/):

```js
const value = ablyft.getTools().getSetBucketingUrlExtension();
// '["12345678_87654321"]' or null if the visitor is in no experiment
```

> **Invalid values:** If the value is not valid JSON or not a non-empty list, the parameter is ignored and an error is logged in debug mode.

## ablyft_show_debug

If [debug mode](https://docs.ablyft.com/developers/debugging/preview-and-live-log/#debug-mode) is on with **Restrict debug mode**, the snippet writes to the
browser console only for visitors who opened a URL with `ablyft_show_debug=true`. The setting is remembered for the tab session.

```text
https://www.example.com/?ablyft_show_debug=true
```

Without restriction, every visitor produces console output while debug mode is on. The parameter has no effect if debug
mode is off.

## ablyft_opt_out

Excludes the browser from ABlyft on this site. Details are in [Storage & privacy](https://docs.ablyft.com/developers/consent-and-security/storage-and-privacy/#opt-out).

```text
https://www.example.com/?ablyft_opt_out=true
https://www.example.com/?ablyft_opt_out=false
```

`true` opts out, `false` opts back in. A message is shown in both cases. Other values do nothing.

## ablyft_check

Shows a browser alert "ABlyft is implemented" if the snippet is installed on the page. A quick test for non-developers.

```text
https://www.example.com/?ablyft_check=true
```

## ablyft_qa_token

Starts the quality assurance tool. ABlyft generates the links with this parameter, so you do not create the value yourself.
The token is remembered for the tab session. Like `ablyft_preview`, the parameter is ignored in URL targeting.
Use **Open with quality assurance tool** in the preview of an experiment, see [Preview and QA](https://docs.ablyft.com/guides/experiments/preview-and-qa/).

## ablyft_editor_variation and ablyft_editor_token

Open the Visual Editor on your page. ABlyft adds both parameters to your example URL when you open the editor, so you do
not create them yourself.

```text
https://example.com/product?ablyft_editor_variation=12345&ablyft_editor_token=YOUR_EDITOR_TOKEN
```

| Parameter                 | Meaning                                                |
| ------------------------- | ------------------------------------------------------ |
| `ablyft_editor_variation` | The ID of the variation you edit.                      |
| `ablyft_editor_token`     | A personal access token that is valid for **8 hours**. |

When the snippet finds the token, it loads the editor on top of your page. See [Visual Editor](https://docs.ablyft.com/guides/experiments/visual-editor/).

## Next steps

- [Debugging](https://docs.ablyft.com/developers/debugging/): Verify the integration.
- [Read the bucketing](https://docs.ablyft.com/developers/reference/javascript-api/get/#bucketing): Read the visitor's assignment with ablyft.get().

