AbTest
A/B test settings and lifecycle returned by test lists, detail queries, and create/update operations.
Metrics are populated by list queries; use abTestResultCounts for goal/date-scoped results.
type AbTest {
id: Int!
autoReweight: Boolean
siteId: Int!
name: String!
devices: [SnapshotDevice!]!
status: AbTestStatus!
pageUrl: String!
matchingUrl: String
thumbnailUrl: String
screenshotUrl: String
type: AbTestType!
goal: AbTestGoal
selectedGoal: AbTestGoal
variants: [AbTestVariant!]
variantsCount: Int
draft: String
audienceDefinition: JSON
originalId: Int
notes: String
conversionGoals: [AbTestGoal]
totalVisitors: Int
totalConversions: Int
totalViews: Int
avgConversionRate: Float
totalValue: AbTestValue
duration: Int
hasResults: Boolean!
bestVariantId: Int
bestVariant: AbTestVariant
createdAt: Int!
publishedAt: Int
stoppedAt: Int
createdBy: User
publishedBy: User
createdByUserId: Int @deprecated
createdByUserName: String @deprecated
scriptInstalled: Boolean!
recentlyCreated: Boolean!
permissions: AbTestPermissions!
significance: Float
}
Fields
AbTest.id ● Int! non-null scalar
AbTest.autoReweight ● Boolean scalar
Whether automatic traffic reweighting is enabled; null only if no stored value is present.
AbTest.siteId ● Int! non-null scalar
Id of the site that owns the test, as listed by sites.
AbTest.name ● String! non-null scalar
AbTest.devices ● [SnapshotDevice!]! non-null enum
Saved effective device set used for test execution.
AbTest.status ● AbTestStatus! non-null enum
Current lifecycle state: DRAFT, RUNNING, STOPPED, or DELETED; a missing stored status is reported as DELETED.
AbTest.pageUrl ● String! non-null scalar
Normalized source page URL used to capture and preview variants.
AbTest.matchingUrl ● String scalar
Stored URL matching pattern, falling back to pageUrl when none is set.
AbTest.thumbnailUrl ● String scalar
Signed control-variant thumbnail URL; null when no control variant or asset path is available.
AbTest.screenshotUrl ● String scalar
Signed control-variant screenshot URL; null when no control variant or asset path is available.
AbTest.type ● AbTestType! non-null enum
PATCH changes page elements; SPLIT redirects visitors to variant URLs.
AbTest.goal ● AbTestGoal object
Primary goal when loaded and on the same site; null when no accessible matching goal is linked.
AbTest.selectedGoal ● AbTestGoal object
Primary goal for abTestResultDetail; null in test lists, editor details, and create/update responses.
AbTest.variants ● [AbTestVariant!] list object
Loaded variants, including retired variants; empty when variant data is not loaded.
AbTest.variantsCount ● Int scalar
Count of variants including retired variants; null when result processing has not populated the count.
AbTest.draft ● String scalar
JSON-encoded string of the wizard inputs last saved by abTestCreate, abTestUpdate, or abTestUpdateDraft: the
input fields except variants, with snake_case keys, including the unsaved goal form and notes. Duplicates
hold a reduced copy of the settings; a test without a draft returns the string null.
AbTest.audienceDefinition ● JSON scalar
Audience JSON value, not a JSON-encoded string; null targets everyone. See audienceDefinitionContract.
AbTest.originalId ● Int scalar
Source test id for a duplicate; null when no source test is recorded.
AbTest.notes ● String scalar
Test notes set by abTestUpdateNotes; null when none. Notes sent in create or update inputs are only in draft.
AbTest.conversionGoals ● [AbTestGoal] list object
Goals with recorded conversions for this test; empty in lists and detail queries, which do not load them.
AbTest.totalVisitors ● Int scalar
Unique test visitors in the loaded metrics; null when metrics have not been loaded.
AbTest.totalConversions ● Int scalar
Converted visitors for the primary goal in the loaded metrics; null when metrics have not been loaded.
AbTest.totalViews ● Int scalar
Not populated by current A/B test queries; null.
AbTest.avgConversionRate ● Float scalar
Conversions divided by visitors as percent, rounded to two decimals; zero with no visitors, null without metrics.
AbTest.totalValue ● AbTestValue object
Conversion value in ten-thousandths of displayCurrency; zero when metrics or recorded amounts are absent.
AbTest.duration ● Int scalar
Seconds the test has run, from publication (or creation) to its stop or deletion time, or to now while running; null for a never-published DRAFT.
AbTest.hasResults ● Boolean! non-null scalar
Whether loaded metrics have at least one visitor; false when metrics are not loaded.
AbTest.bestVariantId ● Int scalar
Id of the non-retired variant, control included, with the highest non-zero conversion rate; null on a tie, without conversions, or when results are not loaded.
AbTest.bestVariant ● AbTestVariant object
Variant identified by bestVariantId; null if the highest conversion rate is tied or metrics are not loaded.
AbTest.createdAt ● Int! non-null scalar
Creation time in Unix seconds.
AbTest.publishedAt ● Int scalar
Publication time in Unix seconds; null until the test has been published.
AbTest.stoppedAt ● Int scalar
Stop time in Unix seconds; null until the test has been stopped.
AbTest.createdBy ● User object
Creator details; missing user records fall back to the saved id/name, which may be null.
AbTest.publishedBy ● User object
Publisher details; saved id/name may be null before publication or for older records.
AbTest.scriptInstalled ● Boolean! non-null scalar
Whether the test is known to be installed on the site; becomes true once the test records a visitor.
AbTest.recentlyCreated ● Boolean! non-null scalar
Whether creation was less than two days ago.
AbTest.permissions ● AbTestPermissions! non-null object
Viewer-specific action flags; mutations enforce their own access and lifecycle checks.
AbTest.significance ● Float scalar
Overall chi-square significance, 0-100 percent; null without metrics, visitors, a control, or VARIANT comparison.
Show deprecatedHide deprecated
AbTest.createdByUserId ● Int deprecated scalar
Use created_by instead
Saved creator user id; null when no creator id was recorded.
AbTest.createdByUserName ● String deprecated scalar
Use created_by instead
Deprecated creator name; current test payloads do not populate this field.
Returned By
abTestAddVariants mutation ● abTestChangeGoal mutation ● abTestCreate mutation ● abTestDelete mutation ● abTestDeleteVariant mutation ● abTestEditorDetail query ● abTestHomeRecent query ● abTestPublish mutation ● abTestRename mutation ● abTestResultDetail query ● abTestRetireVariant mutation ● abTestSaveDraft mutation ● abTestsCreate mutation ● abTestSetTrafficSplit mutation ● abTestStop mutation ● abTestUpdate mutation ● abTestUpdateDraft mutation ● abTestUpdateNotes mutation ● abTestUpdateVariantDescription mutation ● abTestUpdateVariants mutation
Member Of
AbTestsListMeta object ● AbTestsListPaginatedMeta object