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 | experimentId_variationId, comma separated | Show specific variations |
ablyft_exclude_running | true or false | Hide or keep other running experiments during a preview |
ablyft_set_bucketing | JSON list of "experimentId_variationId" | Set the visitor's assignments |
ablyft_show_debug | true | Show debug output when debug mode is restricted |
ablyft_opt_out | true or false | Exclude the browser from ABlyft |
ablyft_check | true | Check that the snippet is installed |
ablyft_qa_token | Token | Start the quality assurance tool |
ablyft_editor_variation, 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.
https://www.example.com/product?ablyft_preview=12345678_87654321
https://www.example.com/product?ablyft_preview=12345678_87654321,23456789_98765432Good 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, 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.
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.
https://www.example.com/product?ablyft_preview=12345678_87654321&ablyft_exclude_running=falseThe 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.
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:
- In Settings → Project Settings, enter the other domain under External tracking domains.
- ABlyft adds the parameter to links that point to this domain.
- 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():
const value = ablyft.getTools().getSetBucketingUrlExtension();
// '["12345678_87654321"]' or null if the visitor is in no experimentInvalid 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 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.
https://www.example.com/?ablyft_show_debug=trueWithout 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://www.example.com/?ablyft_opt_out=true
https://www.example.com/?ablyft_opt_out=falsetrue 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.
https://www.example.com/?ablyft_check=trueablyft_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.
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.
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.