Skip to main content

abTestDistribution

Returns chronological day, week, or month metric buckets for a non-deleted test and same-site goal. Use abTestResultCounts for totals; dates are clamped to publication and stop dates, and an inverted range returns an empty list. Weeks start on Monday and months on the first, after any partial first bucket. Requires A/B testing view access; shared access is also supported.

abTestDistribution(
id: Int!
goalId: Int!
startDate: Int
endDate: Int
timeUnit: TimeUnit!
): [AbTestDistribution!]!

Arguments​

abTestDistribution.id ● Int! non-null scalar​

Test id from abTestList or abTestRefList; deleted tests are excluded.

abTestDistribution.goalId ● Int! non-null scalar​

Goal id from goalRefList for the test site; a missing or different-site goal is an error.

abTestDistribution.startDate ● Int scalar​

Inclusive start in Unix seconds (UTC); defaults to publication when available and is clamped to it.

abTestDistribution.endDate ● Int scalar​

Inclusive end in Unix seconds (UTC); defaults to the stop time, or to the start for a test that is not stopped, so pass it for RUNNING tests.

abTestDistribution.timeUnit ● TimeUnit! non-null enum​

Bucket size: DAY, WEEK, or MONTH; the first and last buckets may cover partial periods.

Type​

AbTestDistribution object​

One chronological time bucket returned by abTestDistribution, containing per-variant metrics.