Set the A/B experiment-detection override
Turn A/B experiment detection on or off for a location. Requires an agency key (ak_) and ?location_id=; viewer keys get 403 agency_required.
Accepted values for capture_experiments:
null— use the SDK default, which is on. -true— on with SDK defaults. -{ "trackExposures": true, "pollWindowMs": 10000, "dataLayerName": "dataLayer" }— on, with those overrides.pollWindowMsmust be 1000–30000;dataLayerNamemust be a plain JavaScript identifier. Values outside the range and unknown keys are rejected rather than ignored.false— off.
When on, the SDK detects that a supported testing tool has bucketed the visitor and attaches the assignment to every subsequent event as the $experiments super property (["<experimentId>:<variationId>"]) plus $ab_platform, and emits one $experiment_viewed event per session per assignment. Nothing needs tagging on the client's site.
This is the one override that is on by default, and only false changes anything. The SDK sends its first $pageview before it fetches remote config, and for a split-URL test that pageview is the exposure — so a detection feature that waited for this setting would miss the assignment on every page load. Enabling it here is honoured but late; it cannot attach an assignment to a pageview already sent.
Setting false also un-publishes $experiments in the browser, so opting out does not leave the property stuck on sessions from an earlier load. HIPAA-mode locations never run detection, and a site with disable_remote_config: true never sees this setting at all.
Detection is inert on sites with no testing tool: one cookie read, no properties published, and the page's dataLayer is left untouched.
curl -X PUT "https://mythic-analytics.gulp.workers.dev/client/v1/settings/experiments" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"capture_experiments": false
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/settings/experiments"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"capture_experiments": false
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/settings/experiments", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"capture_experiments": false
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"capture_experiments": false
}`)
req, err := http.NewRequest("PUT", "https://mythic-analytics.gulp.workers.dev/client/v1/settings/experiments", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/settings/experiments')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"capture_experiments": false
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"capture_experiments": false
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
/experiments
Target server for requests. Edit to use your own host.
Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.
Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.The media type of the request body
true, false, null, or { trackExposures, pollWindowMs, dataLayerName }.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.
Body
true, false, null, or \\{ trackExposures, pollWindowMs, dataLayerName \\}.
false