SettingsSet the A/B experiment-detection override

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. pollWindowMs must be 1000–30000; dataLayerName must 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
}'
{
  "success": true,
  "data": {
    "capture_experiments": false
  }
}
PUT
/experiments
PUT
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

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.

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.
Content-Typestring
Required

The media type of the request body

Options: application/json
capture_experimentsstring
Required

true, false, null, or { trackExposures, pollWindowMs, dataLayerName }.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

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

application/json
capture_experimentsstring
Required

true, false, null, or \\{ trackExposures, pollWindowMs, dataLayerName \\}.

Example:
false

Responses

successboolean
dataobject