:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(experiments): add breakdown attribution schema changes (#84867)
Rodrigo Iloroc931dff40266
diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.jsonindex 9d8eef151673..3183643a89ca 100644--- a/frontend/src/queries/schema.json+++ b/frontend/src/queries/schema.json@@ -23374,6 +23374,15 @@"ExperimentFunnelMetric": {"additionalProperties": false,"properties": {+ "breakdownAttributionType": {+ "$ref": "#/definitions/BreakdownAttributionType",+ "default": "first_touch",+ "description": "How to attribute the breakdown value across funnel steps."+ },+ "breakdownAttributionValue": {+ "description": "When breakdownAttributionType is `step`, the 0-indexed step to attribute from.",+ "type": "integer"+ },"breakdownFilter": {"$ref": "#/definitions/BreakdownFilter"},@@ -23453,6 +23462,15 @@"ExperimentFunnelMetricTypeProps": {"additionalProperties": false,"properties": {+ "breakdownAttributionType": {+ "$ref": "#/definitions/BreakdownAttributionType",+ "default": "first_touch",+ "description": "How to attribute the breakdown value across funnel steps."+ },+ "breakdownAttributionValue": {+ "description": "When breakdownAttributionType is `step`, the 0-indexed step to attribute from.",+ "type": "integer"+ },"funnel_order_type": {"$ref": "#/definitions/StepOrderValue"},diff --git a/frontend/src/queries/schema/schema-general.ts b/frontend/src/queries/schema/schema-general.tsindex 43ac18f80c21..993f23d85e70 100644--- a/frontend/src/queries/schema/schema-general.ts+++ b/frontend/src/queries/schema/schema-general.ts@@ -9,6 +9,7 @@ import {AnyPersonScopeFilter,AnyPropertyFilter,BaseMathType,+ BreakdownAttributionType,BreakdownKeyType,BreakdownType,CalendarHeatmapMathType,@@ -5250,6 +5251,10 @@ export type ExperimentFunnelMetric = ExperimentMetricBaseProperties & {metric_type: ExperimentMetricType.FUNNELseries: ExperimentFunnelMetricStep[]funnel_order_type?: StepOrderValue+ /** How to attribute the breakdown value across funnel steps. @default first_touch */+ breakdownAttributionType?: BreakdownAttributionType+ /** When breakdownAttributionType is `step`, the 0-indexed step to attribute from. @asType integer */+ breakdownAttributionValue?: integer}export const isExperimentFunnelMetric = (metric: ExperimentMetric): metric is ExperimentFunnelMetric =>diff --git a/frontend/src/queries/validators.js b/frontend/src/queries/validators.jsindex 23f9e67d7690..6aaefa035e3e 100644--- a/frontend/src/queries/validators.js+++ b/frontend/src/queries/validators.js@@ -11319,6 +11319,15 @@ function validate86(data, { instancePath = '', parentData, parentDataProperty, rconst schema101 = {additionalProperties: false,properties: {+ breakdownAttributionType: {+ $ref: '#/definitions/BreakdownAttributionType',+ default: 'first_touch',+ description: 'How to attribute the breakdown value across funnel steps.',+ },+ breakdownAttributionValue: {+ description: 'When breakdownAttributionType is `step`, the 0-indexed step to attribute from.',+ type: 'integer',+ },breakdownFilter: { $ref: '#/definitions/BreakdownFilter' },conversion_window: { $ref: '#/definitions/integer' },conversion_window_unit: { $ref: '#/definitions/FunnelConversionWindowTimeUnit' },@@ -11338,8 +11347,9 @@ const schema101 = {required: ['kind', 'metric_type', 'series'],type: 'object',}-const schema104 = { enum: ['strict', 'unordered', 'ordered'], type: 'string' }-const schema106 = {+const schema102 = { enum: ['first_touch', 'last_touch', 'all_events', 'step'], type: 'string' }+const schema105 = { enum: ['strict', 'unordered', 'ordered'], type: 'string' }+const schema107 = {discriminator: { propertyName: 'kind' },oneOf: [{ $ref: '#/definitions/EventsNode' },@@ -11491,32 +11501,53 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,}}if (_errs1 === errors) {- if (data.breakdownFilter !== undefined) {+ if (data.breakdownAttributionType !== undefined) {+ let data0 = data.breakdownAttributionTypeconst _errs2 = errors+ if (typeof data0 !== 'string') {+ validate114.errors = [+ {+ instancePath: instancePath + '/breakdownAttributionType',+ schemaPath: '#/definitions/BreakdownAttributionType/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }if (- !validate87(data.breakdownFilter, {- instancePath: instancePath + '/breakdownFilter',- parentData: data,- parentDataProperty: 'breakdownFilter',- rootData,- })+ !(+ data0 === 'first_touch' ||+ data0 === 'last_touch' ||+ data0 === 'all_events' ||+ data0 === 'step'+ )) {- vErrors = vErrors === null ? validate87.errors : vErrors.concat(validate87.errors)- errors = vErrors.length+ validate114.errors = [+ {+ instancePath: instancePath + '/breakdownAttributionType',+ schemaPath: '#/definitions/BreakdownAttributionType/enum',+ keyword: 'enum',+ params: { allowedValues: schema102.enum },+ message: 'must be equal to one of the allowed values',+ },+ ]+ return false}var valid0 = _errs2 === errors} else {var valid0 = true}if (valid0) {- if (data.conversion_window !== undefined) {- let data1 = data.conversion_window- const _errs3 = errors+ if (data.breakdownAttributionValue !== undefined) {+ let data1 = data.breakdownAttributionValue+ const _errs5 = errorsif (!(typeof data1 == 'number' && !(data1 % 1) && !isNaN(data1) && isFinite(data1))) {validate114.errors = [{- instancePath: instancePath + '/conversion_window',- schemaPath: '#/definitions/integer/type',+ instancePath: instancePath + '/breakdownAttributionValue',+ schemaPath: '#/properties/breakdownAttributionValue/type',keyword: 'type',params: { type: 'integer' },message: 'must be integer',@@ -11524,79 +11555,59 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,]return false}- var valid0 = _errs3 === errors+ var valid0 = _errs5 === errors} else {var valid0 = true}if (valid0) {- if (data.conversion_window_unit !== undefined) {- let data2 = data.conversion_window_unit- const _errs6 = errors- if (typeof data2 !== 'string') {- validate114.errors = [- {- instancePath: instancePath + '/conversion_window_unit',- schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/type',- keyword: 'type',- params: { type: 'string' },- message: 'must be string',- },- ]- return false- }+ if (data.breakdownFilter !== undefined) {+ const _errs7 = errorsif (- !(- data2 === 'second' ||- data2 === 'minute' ||- data2 === 'hour' ||- data2 === 'day' ||- data2 === 'week' ||- data2 === 'month'- )+ !validate87(data.breakdownFilter, {+ instancePath: instancePath + '/breakdownFilter',+ parentData: data,+ parentDataProperty: 'breakdownFilter',+ rootData,+ })) {- validate114.errors = [- {- instancePath: instancePath + '/conversion_window_unit',- schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/enum',- keyword: 'enum',- params: { allowedValues: schema82.enum },- message: 'must be equal to one of the allowed values',- },- ]- return false+ vErrors = vErrors === null ? validate87.errors : vErrors.concat(validate87.errors)+ errors = vErrors.length}- var valid0 = _errs6 === errors+ var valid0 = _errs7 === errors} else {var valid0 = true}if (valid0) {- if (data.fingerprint !== undefined) {- const _errs9 = errors- if (typeof data.fingerprint !== 'string') {+ if (data.conversion_window !== undefined) {+ let data3 = data.conversion_window+ const _errs8 = errors+ if (+ !(typeof data3 == 'number' && !(data3 % 1) && !isNaN(data3) && isFinite(data3))+ ) {validate114.errors = [{- instancePath: instancePath + '/fingerprint',- schemaPath: '#/properties/fingerprint/type',+ instancePath: instancePath + '/conversion_window',+ schemaPath: '#/definitions/integer/type',keyword: 'type',- params: { type: 'string' },- message: 'must be string',+ params: { type: 'integer' },+ message: 'must be integer',},]return false}- var valid0 = _errs9 === errors+ var valid0 = _errs8 === errors} else {var valid0 = true}if (valid0) {- if (data.funnel_order_type !== undefined) {- let data4 = data.funnel_order_type+ if (data.conversion_window_unit !== undefined) {+ let data4 = data.conversion_window_unitconst _errs11 = errorsif (typeof data4 !== 'string') {validate114.errors = [{- instancePath: instancePath + '/funnel_order_type',- schemaPath: '#/definitions/StepOrderValue/type',+ instancePath: instancePath + '/conversion_window_unit',+ schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/type',keyword: 'type',params: { type: 'string' },message: 'must be string',@@ -11604,13 +11615,22 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,]return false}- if (!(data4 === 'strict' || data4 === 'unordered' || data4 === 'ordered')) {+ if (+ !(+ data4 === 'second' ||+ data4 === 'minute' ||+ data4 === 'hour' ||+ data4 === 'day' ||+ data4 === 'week' ||+ data4 === 'month'+ )+ ) {validate114.errors = [{- instancePath: instancePath + '/funnel_order_type',- schemaPath: '#/definitions/StepOrderValue/enum',+ instancePath: instancePath + '/conversion_window_unit',+ schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/enum',keyword: 'enum',- params: { allowedValues: schema104.enum },+ params: { allowedValues: schema82.enum },message: 'must be equal to one of the allowed values',},]@@ -11621,14 +11641,13 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,var valid0 = true}if (valid0) {- if (data.goal !== undefined) {- let data5 = data.goal+ if (data.fingerprint !== undefined) {const _errs14 = errors- if (typeof data5 !== 'string') {+ if (typeof data.fingerprint !== 'string') {validate114.errors = [{- instancePath: instancePath + '/goal',- schemaPath: '#/definitions/ExperimentMetricGoal/type',+ instancePath: instancePath + '/fingerprint',+ schemaPath: '#/properties/fingerprint/type',keyword: 'type',params: { type: 'string' },message: 'must be string',@@ -11636,50 +11655,57 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,]return false}- if (!(data5 === 'increase' || data5 === 'decrease')) {- validate114.errors = [- {- instancePath: instancePath + '/goal',- schemaPath: '#/definitions/ExperimentMetricGoal/enum',- keyword: 'enum',- params: { allowedValues: schema83.enum },- message: 'must be equal to one of the allowed values',- },- ]- return false- }var valid0 = _errs14 === errors} else {var valid0 = true}if (valid0) {- if (data.isSharedMetric !== undefined) {- const _errs17 = errors- if (typeof data.isSharedMetric !== 'boolean') {+ if (data.funnel_order_type !== undefined) {+ let data6 = data.funnel_order_type+ const _errs16 = errors+ if (typeof data6 !== 'string') {validate114.errors = [{- instancePath: instancePath + '/isSharedMetric',- schemaPath: '#/properties/isSharedMetric/type',+ instancePath: instancePath + '/funnel_order_type',+ schemaPath: '#/definitions/StepOrderValue/type',keyword: 'type',- params: { type: 'boolean' },- message: 'must be boolean',+ params: { type: 'string' },+ message: 'must be string',},]return false}- var valid0 = _errs17 === errors+ if (+ !(+ data6 === 'strict' ||+ data6 === 'unordered' ||+ data6 === 'ordered'+ )+ ) {+ validate114.errors = [+ {+ instancePath: instancePath + '/funnel_order_type',+ schemaPath: '#/definitions/StepOrderValue/enum',+ keyword: 'enum',+ params: { allowedValues: schema105.enum },+ message: 'must be equal to one of the allowed values',+ },+ ]+ return false+ }+ var valid0 = _errs16 === errors} else {var valid0 = true}if (valid0) {- if (data.kind !== undefined) {- let data7 = data.kind+ if (data.goal !== undefined) {+ let data7 = data.goalconst _errs19 = errorsif (typeof data7 !== 'string') {validate114.errors = [{- instancePath: instancePath + '/kind',- schemaPath: '#/properties/kind/type',+ instancePath: instancePath + '/goal',+ schemaPath: '#/definitions/ExperimentMetricGoal/type',keyword: 'type',params: { type: 'string' },message: 'must be string',@@ -11687,14 +11713,14 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,]return false}- if ('ExperimentMetric' !== data7) {+ if (!(data7 === 'increase' || data7 === 'decrease')) {validate114.errors = [{- instancePath: instancePath + '/kind',- schemaPath: '#/properties/kind/const',- keyword: 'const',- params: { allowedValue: 'ExperimentMetric' },- message: 'must be equal to constant',+ instancePath: instancePath + '/goal',+ schemaPath: '#/definitions/ExperimentMetricGoal/enum',+ keyword: 'enum',+ params: { allowedValues: schema83.enum },+ message: 'must be equal to one of the allowed values',},]return false@@ -11704,45 +11730,33 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,var valid0 = true}if (valid0) {- if (data.metric_type !== undefined) {- let data8 = data.metric_type- const _errs21 = errors- if (typeof data8 !== 'string') {+ if (data.isSharedMetric !== undefined) {+ const _errs22 = errors+ if (typeof data.isSharedMetric !== 'boolean') {validate114.errors = [{- instancePath: instancePath + '/metric_type',- schemaPath: '#/properties/metric_type/type',+ instancePath: instancePath + '/isSharedMetric',+ schemaPath: '#/properties/isSharedMetric/type',keyword: 'type',- params: { type: 'string' },- message: 'must be string',- },- ]- return false- }- if ('funnel' !== data8) {- validate114.errors = [- {- instancePath: instancePath + '/metric_type',- schemaPath: '#/properties/metric_type/const',- keyword: 'const',- params: { allowedValue: 'funnel' },- message: 'must be equal to constant',+ params: { type: 'boolean' },+ message: 'must be boolean',},]return false}- var valid0 = _errs21 === errors+ var valid0 = _errs22 === errors} else {var valid0 = true}if (valid0) {- if (data.name !== undefined) {- const _errs23 = errors- if (typeof data.name !== 'string') {+ if (data.kind !== undefined) {+ let data9 = data.kind+ const _errs24 = errors+ if (typeof data9 !== 'string') {validate114.errors = [{- instancePath: instancePath + '/name',- schemaPath: '#/properties/name/type',+ instancePath: instancePath + '/kind',+ schemaPath: '#/properties/kind/type',keyword: 'type',params: { type: 'string' },message: 'must be string',@@ -11750,109 +11764,94 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,]return false}- var valid0 = _errs23 === errors+ if ('ExperimentMetric' !== data9) {+ validate114.errors = [+ {+ instancePath: instancePath + '/kind',+ schemaPath: '#/properties/kind/const',+ keyword: 'const',+ params: { allowedValue: 'ExperimentMetric' },+ message: 'must be equal to constant',+ },+ ]+ return false+ }+ var valid0 = _errs24 === errors} else {var valid0 = true}if (valid0) {- if (data.response !== undefined) {- let data10 = data.response- const _errs25 = errors- if (- !(- data10 &&- typeof data10 == 'object' &&- !Array.isArray(data10)- )- ) {+ if (data.metric_type !== undefined) {+ let data10 = data.metric_type+ const _errs26 = errors+ if (typeof data10 !== 'string') {validate114.errors = [{- instancePath: instancePath + '/response',- schemaPath: '#/properties/response/type',+ instancePath: instancePath + '/metric_type',+ schemaPath: '#/properties/metric_type/type',keyword: 'type',- params: { type: 'object' },- message: 'must be object',+ params: { type: 'string' },+ message: 'must be string',},]return false}- var valid0 = _errs25 === errors+ if ('funnel' !== data10) {+ validate114.errors = [+ {+ instancePath: instancePath + '/metric_type',+ schemaPath:+ '#/properties/metric_type/const',+ keyword: 'const',+ params: { allowedValue: 'funnel' },+ message: 'must be equal to constant',+ },+ ]+ return false+ }+ var valid0 = _errs26 === errors} else {var valid0 = true}if (valid0) {- if (data.series !== undefined) {- let data11 = data.series- const _errs27 = errors- if (errors === _errs27) {- if (Array.isArray(data11)) {- var valid5 = true- const len0 = data11.length- for (let i0 = 0; i0 < len0; i0++) {- const _errs29 = errors- if (- !validate116(data11[i0], {- instancePath:- instancePath +- '/series/' +- i0,- parentData: data11,- parentDataProperty: i0,- rootData,- })- ) {- vErrors =- vErrors === null- ? validate116.errors- : vErrors.concat(- validate116.errors- )- errors = vErrors.length- }- var valid5 = _errs29 === errors- if (!valid5) {- break- }- }- } else {- validate114.errors = [- {- instancePath:- instancePath + '/series',- schemaPath:- '#/properties/series/type',- keyword: 'type',- params: { type: 'array' },- message: 'must be array',- },- ]- return false- }+ if (data.name !== undefined) {+ const _errs28 = errors+ if (typeof data.name !== 'string') {+ validate114.errors = [+ {+ instancePath: instancePath + '/name',+ schemaPath: '#/properties/name/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false}- var valid0 = _errs27 === errors+ var valid0 = _errs28 === errors} else {var valid0 = true}if (valid0) {- if (data.sharedMetricId !== undefined) {- let data13 = data.sharedMetricId+ if (data.response !== undefined) {+ let data12 = data.responseconst _errs30 = errorsif (!(- typeof data13 == 'number' &&- isFinite(data13)+ data12 &&+ typeof data12 == 'object' &&+ !Array.isArray(data12))) {validate114.errors = [{instancePath:- instancePath +- '/sharedMetricId',+ instancePath + '/response',schemaPath:- '#/properties/sharedMetricId/type',+ '#/properties/response/type',keyword: 'type',- params: { type: 'number' },- message: 'must be number',+ params: { type: 'object' },+ message: 'must be object',},]return false@@ -11862,30 +11861,63 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,var valid0 = true}if (valid0) {- if (data.uuid !== undefined) {+ if (data.series !== undefined) {+ let data13 = data.seriesconst _errs32 = errors- if (typeof data.uuid !== 'string') {- validate114.errors = [- {- instancePath:- instancePath + '/uuid',- schemaPath:- '#/properties/uuid/type',- keyword: 'type',- params: { type: 'string' },- message: 'must be string',- },- ]- return false+ if (errors === _errs32) {+ if (Array.isArray(data13)) {+ var valid6 = true+ const len0 = data13.length+ for (let i0 = 0; i0 < len0; i0++) {+ const _errs34 = errors+ if (+ !validate116(data13[i0], {+ instancePath:+ instancePath ++ '/series/' ++ i0,+ parentData: data13,+ parentDataProperty: i0,+ rootData,+ })+ ) {+ vErrors =+ vErrors === null+ ? validate116.errors+ : vErrors.concat(+ validate116.errors+ )+ errors = vErrors.length+ }+ var valid6 = _errs34 === errors+ if (!valid6) {+ break+ }+ }+ } else {+ validate114.errors = [+ {+ instancePath:+ instancePath ++ '/series',+ schemaPath:+ '#/properties/series/type',+ keyword: 'type',+ params: { type: 'array' },+ message: 'must be array',+ },+ ]+ return false+ }}var valid0 = _errs32 === errors} else {var valid0 = true}if (valid0) {- if (data.version !== undefined) {- let data15 = data.version- const _errs34 = errors+ if (data.sharedMetricId !== undefined) {+ let data15 = data.sharedMetricId+ const _errs35 = errorsif (!(typeof data15 == 'number' &&@@ -11896,9 +11928,9 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,{instancePath:instancePath +- '/version',+ '/sharedMetricId',schemaPath:- '#/properties/version/type',+ '#/properties/sharedMetricId/type',keyword: 'type',params: { type: 'number' },message: 'must be number',@@ -11906,10 +11938,69 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,]return false}- var valid0 = _errs34 === errors+ var valid0 = _errs35 === errors} else {var valid0 = true}+ if (valid0) {+ if (data.uuid !== undefined) {+ const _errs37 = errors+ if (typeof data.uuid !== 'string') {+ validate114.errors = [+ {+ instancePath:+ instancePath ++ '/uuid',+ schemaPath:+ '#/properties/uuid/type',+ keyword: 'type',+ params: {+ type: 'string',+ },+ message:+ 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs37 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.version !== undefined) {+ let data17 = data.version+ const _errs39 = errors+ if (+ !(+ typeof data17 ==+ 'number' &&+ isFinite(data17)+ )+ ) {+ validate114.errors = [+ {+ instancePath:+ instancePath ++ '/version',+ schemaPath:+ '#/properties/version/type',+ keyword: 'type',+ params: {+ type: 'number',+ },+ message:+ 'must be number',+ },+ ]+ return false+ }+ var valid0 = _errs39 === errors+ } else {+ var valid0 = true+ }+ }+ }}}}@@ -11942,7 +12033,7 @@ function validate114(data, { instancePath = '', parentData, parentDataProperty,validate114.errors = vErrorsreturn errors === 0}-const schema107 = {+const schema108 = {additionalProperties: false,properties: {breakdownFilter: { $ref: '#/definitions/BreakdownFilter' },@@ -11966,7 +12057,7 @@ const schema107 = {required: ['denominator', 'kind', 'metric_type', 'numerator'],type: 'object',}-const schema110 = {+const schema111 = {additionalProperties: false,properties: {ignore_zeros: { type: 'boolean' },@@ -12012,7 +12103,7 @@ function validate122(data, { instancePath = '', parentData, parentDataProperty,} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema107.properties, key0)) {+ if (!func2.call(schema108.properties, key0)) {validate122.errors = [{instancePath,@@ -12932,7 +13023,7 @@ function validate122(data, { instancePath = '', parentData, parentDataProperty,validate122.errors = vErrorsreturn errors === 0}-const schema113 = {+const schema114 = {additionalProperties: false,properties: {breakdownFilter: { $ref: '#/definitions/BreakdownFilter' },@@ -12996,7 +13087,7 @@ function validate127(data, { instancePath = '', parentData, parentDataProperty,} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema113.properties, key0)) {+ if (!func2.call(schema114.properties, key0)) {validate127.errors = [{instancePath,@@ -13495,7 +13586,7 @@ function validate127(data, { instancePath = '', parentData, parentDataProperty,keyword: 'enum',params: {allowedValues:- schema113+ schema114.properties.start_handling.enum,diff --git a/posthog/schema.py b/posthog/schema.pyindex 0cc9243e6436..cc7dde0481e3 100644--- a/posthog/schema.py+++ b/posthog/schema.py@@ -27489,6 +27489,14 @@ class ExperimentFunnelMetricTypeProps(BaseModel):model_config = ConfigDict(extra="forbid",)+ breakdownAttributionType: BreakdownAttributionType | None = Field(+ default=BreakdownAttributionType.FIRST_TOUCH,+ description="How to attribute the breakdown value across funnel steps.",+ )+ breakdownAttributionValue: int | None = Field(+ default=None,+ description=("When breakdownAttributionType is `step`, the 0-indexed step to attribute from."),+ )funnel_order_type: StepOrderValue | None = Nonemetric_type: Literal["funnel"] = "funnel"series: list[Annotated[EventsNode | ActionsNode | ExperimentDataWarehouseNode, Field(discriminator="kind")]]@@ -27954,6 +27962,14 @@ class ExperimentFunnelMetric(BaseModel):model_config = ConfigDict(extra="forbid",)+ breakdownAttributionType: BreakdownAttributionType | None = Field(+ default=BreakdownAttributionType.FIRST_TOUCH,+ description="How to attribute the breakdown value across funnel steps.",+ )+ breakdownAttributionValue: int | None = Field(+ default=None,+ description=("When breakdownAttributionType is `step`, the 0-indexed step to attribute from."),+ )breakdownFilter: BreakdownFilter | None = Noneconversion_window: int | None = Noneconversion_window_unit: FunnelConversionWindowTimeUnit | None = Nonediff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.tsindex fdafc0f3fd99..7e3a3ad06702 100644--- a/products/dashboards/frontend/generated/api.schemas.ts+++ b/products/dashboards/frontend/generated/api.schemas.ts@@ -6015,6 +6015,10 @@ export interface ExperimentMeanMetricApi {export type ExperimentFunnelMetricApiResponse = { [key: string]: unknown } | nullexport interface ExperimentFunnelMetricApi {+ /** How to attribute the breakdown value across funnel steps. */+ breakdownAttributionType?: BreakdownAttributionTypeApi | null+ /** When breakdownAttributionType is `step`, the 0-indexed step to attribute from. */+ breakdownAttributionValue?: number | nullbreakdownFilter?: BreakdownFilterApi | nullconversion_window?: number | nullconversion_window_unit?: FunnelConversionWindowTimeUnitApi | nulldiff --git a/products/product_analytics/frontend/generated/api.schemas.ts b/products/product_analytics/frontend/generated/api.schemas.tsindex 27592e4a9ed8..560535d11736 100644--- a/products/product_analytics/frontend/generated/api.schemas.ts+++ b/products/product_analytics/frontend/generated/api.schemas.ts@@ -5177,6 +5177,10 @@ export interface ExperimentMeanMetricApi {export type ExperimentFunnelMetricApiResponse = { [key: string]: unknown } | nullexport interface ExperimentFunnelMetricApi {+ /** How to attribute the breakdown value across funnel steps. */+ breakdownAttributionType?: BreakdownAttributionTypeApi | null+ /** When breakdownAttributionType is `step`, the 0-indexed step to attribute from. */+ breakdownAttributionValue?: number | nullbreakdownFilter?: BreakdownFilterApi | nullconversion_window?: number | nullconversion_window_unit?: FunnelConversionWindowTimeUnitApi | nulldiff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 5fb6fadd1556..d08dfaba7a2c 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -4754,6 +4754,10 @@ export namespace Schemas {export type ExperimentFunnelMetricResponse = { [key: string]: unknown } | null;export interface ExperimentFunnelMetric {+ /** How to attribute the breakdown value across funnel steps. */+ breakdownAttributionType?: BreakdownAttributionType | null;+ /** When breakdownAttributionType is `step`, the 0-indexed step to attribute from. */+ breakdownAttributionValue?: number | null;breakdownFilter?: BreakdownFilter | null;conversion_window?: number | null;conversion_window_unit?: FunnelConversionWindowTimeUnit | null;