Skip to main content

AbTestCreateInput

Settings for abTestCreate, abTestUpdate, and abTestUpdateDraft; goal holds draft form data only. Full updates preserve an omitted audience and ignore variants; use variant mutations to change variants.

input AbTestCreateInput {
name: String
siteId: Int!
goalId: Int
url: String
matchingUrl: String!
devices: [SnapshotDevice!]
createSnapshots: Boolean
variants: [AbTestVariantInput!]
type: AbTestType!
autoReweight: Boolean
patchStrategy: AbTestPatchStrategy
notes: String
audienceDefinition: String
goal: GoalDraftParams
}

Fields​

AbTestCreateInput.name ● String scalar​

Test name; required when creating a test, while omitted full updates preserve the stored name.

AbTestCreateInput.siteId ● Int! non-null scalar​

Site id from sites; use the siteId that abTestCheckPage returns for the page URL.

AbTestCreateInput.goalId ● Int scalar​

Existing primary goal id from goalRefList; goal instead stores an unsaved draft form.

AbTestCreateInput.url ● String scalar​

Page URL the test runs on, saved as pageUrl after trimming and adding a missing HTTP scheme; matchingUrl is used when omitted.

AbTestCreateInput.matchingUrl ● String! non-null scalar​

URL pattern of the pages that run the test, where * is a wildcard, for example https://example.com/products/*; required even when url is set.

AbTestCreateInput.devices ● [SnapshotDevice!] list enum​

Device types the test runs on and its snapshots cover; required and non-empty. Must match the audience's effective devices; a null audience targets all three device types.

AbTestCreateInput.createSnapshots ● Boolean scalar​

Creates one snapshot per variant and device when a PATCH test is published or variants are added to it while RUNNING; omitted or false turns this off, including on abTestUpdate.

AbTestCreateInput.variants ● [AbTestVariantInput!] list input​

Variants for abTestCreate; the first becomes the control and the rest become variants. On abTestSaveDraft, include every existing variant exactly once with its numeric id and the original control first. Ignored by abTestUpdate and abTestUpdateDraft.

AbTestCreateInput.type ● AbTestType! non-null enum​

PATCH applies editor changes; SPLIT redirects to variant URLs.

AbTestCreateInput.autoReweight ● Boolean scalar​

Whether automatic traffic reweighting is enabled; defaults to true when no stored or supplied value exists.

AbTestCreateInput.patchStrategy ● AbTestPatchStrategy enum​

How the page applies PATCH transforms; defaults to async when omitted on abTestCreate or abTestUpdate.

AbTestCreateInput.notes ● String scalar​

Notes saved on the test by abTestSaveDraft; other create/update inputs save them only in draft metadata. Use abTestUpdateNotes to change notes independently.

AbTestCreateInput.audienceDefinition ● String scalar​

JSON-encoded string. Audience object with version, operator, conditions, and optional except, defined by audienceDefinitionContract; preserve every requested criterion, including device criteria. Null targets everyone, an omitted value keeps the current audience on updates, and devices must match. Example: {"version":1,"operator":"and","conditions":[{"criteria":"device","comparison":"any","value":["desktop"]}]}

AbTestCreateInput.goal ● GoalDraftParams input​

Not used in the AB Test creation, it is there only for draft data

Member Of​

abTestCreate mutation ● abTestSaveDraft mutation ● abTestsCreate mutation ● abTestUpdate mutation ● abTestUpdateDraft mutation