Skip to content

: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.

feat(funnels): scope persons modal to clicked period in compare mode (#65291)

Thomas Obermüllerda43f405db11
diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json
index 6bd56d203b3c..0fa4aa5a3a15 100644
--- a/frontend/src/queries/schema.json
+++ b/frontend/src/queries/schema.json
@@ -22433,6 +22433,11 @@
"FunnelsActorsQuery": {
"additionalProperties": false,
"properties": {
+ "compare": {
+ "description": "When the source funnel has compare-to-previous enabled, scopes the actors to a single period. The runner resolves `'previous'` to the shifted date range; `'current'` (or unset) uses the source's own date range.",
+ "enum": ["current", "previous"],
+ "type": "string"
+ },
"funnelStep": {
"$ref": "#/definitions/integer",
"description": "Index of the step for which we want to get the timestamp for, per person. Positive for converted persons, negative for dropped of persons."
diff --git a/frontend/src/queries/schema/schema-general.ts b/frontend/src/queries/schema/schema-general.ts
index 8f1e936e99b9..a5ffc10e72eb 100644
--- a/frontend/src/queries/schema/schema-general.ts
+++ b/frontend/src/queries/schema/schema-general.ts
@@ -4478,6 +4478,10 @@ export interface FunnelsActorsQuery extends InsightActorsQueryBase {
funnelTrendsDropOff?: boolean
/** Used together with `funnelTrendsDropOff` for funnels time conversion date for the persons modal. */
funnelTrendsEntrancePeriodStart?: string
+ /** When the source funnel has compare-to-previous enabled, scopes the actors to a single
+ * period. The runner resolves `'previous'` to the shifted date range; `'current'` (or unset)
+ * uses the source's own date range. */
+ compare?: 'current' | 'previous'
}
export interface FunnelCorrelationActorsQuery extends InsightActorsQueryBase {
diff --git a/frontend/src/scenes/funnels/funnelPersonsModalLogic.test.ts b/frontend/src/scenes/funnels/funnelPersonsModalLogic.test.ts
index a022e8d33d5c..08f4fb356e86 100644
--- a/frontend/src/scenes/funnels/funnelPersonsModalLogic.test.ts
+++ b/frontend/src/scenes/funnels/funnelPersonsModalLogic.test.ts
@@ -9,7 +9,7 @@ import { urls } from 'scenes/urls'
import { useMocks } from '~/mocks/jest'
import { InsightVizNode, NodeKind } from '~/queries/schema/schema-general'
import { initKeaTests } from '~/test/init'
-import { InsightLogicProps, InsightShortId } from '~/types'
+import { FunnelStep, FunnelStepWithConversionMetrics, InsightLogicProps, InsightShortId } from '~/types'
import { funnelPersonsModalLogic } from './funnelPersonsModalLogic'
@@ -17,6 +17,36 @@ jest.mock('scenes/trends/persons-modal/PersonsModal')
const Insight123 = '123' as InsightShortId
+const makeSeries = (
+ overrides: Partial<FunnelStepWithConversionMetrics> = {}
+): Omit<FunnelStepWithConversionMetrics, 'nested_breakdown'> => ({
+ action_id: '$pageview',
+ average_conversion_time: 0,
+ median_conversion_time: 0,
+ count: 1,
+ name: '$pageview',
+ order: 0,
+ type: 'events',
+ converted_people_url: '',
+ dropped_people_url: '',
+ droppedOffFromPrevious: 0,
+ conversionRates: { fromPrevious: 1, total: 1, fromBasisStep: 1 },
+ ...overrides,
+})
+
+const makeStep = (overrides: Partial<FunnelStep> = {}): FunnelStep => ({
+ action_id: '$pageview',
+ average_conversion_time: 0,
+ median_conversion_time: 0,
+ count: 1,
+ name: '$pageview',
+ order: 0,
+ type: 'events',
+ converted_people_url: '',
+ dropped_people_url: '',
+ ...overrides,
+})
+
describe('funnelPersonsModalLogic', () => {
let logic: ReturnType<typeof funnelPersonsModalLogic.build>
@@ -61,27 +91,19 @@ describe('funnelPersonsModalLogic', () => {
const props = { dashboardItemId: Insight123 }
beforeEach(async () => {
await initFunnelPersonsModalLogic(props)
- })
-
- test('openPersonsModalForStep calls openPersonsModal', async () => {
await expectLogic().toDispatchActions(preflightLogic, ['loadPreflightSuccess'])
await expectLogic(() => {
router.actions.push(urls.insightEdit(Insight123))
})
+ })
+ test('openPersonsModalForStep calls openPersonsModal', async () => {
logic.actions.openPersonsModalForStep({
- step: {
- action_id: '$pageview',
- average_conversion_time: 0,
- median_conversion_time: 0,
- count: 1,
- name: '$pageview',
- order: 0,
- type: 'events',
+ step: makeStep({
// Breakdown must be ignored in openPersonsModalForStep
converted_people_url: '/some/people/url?funnel_step=2&funnel_step_breakdown=USA',
dropped_people_url: '/some/people/url?funnel_step=-2&funnel_step_breakdown=USA',
- },
+ }),
converted: true,
})
@@ -94,52 +116,112 @@ describe('funnelPersonsModalLogic', () => {
})
test('openPersonsModalForSeries calls openPersonsModal', async () => {
- await expectLogic().toDispatchActions(preflightLogic, ['loadPreflightSuccess'])
- await expectLogic(() => {
- router.actions.push(urls.insightEdit(Insight123))
- })
-
logic.actions.openPersonsModalForSeries({
- series: {
- action_id: '$pageview',
- average_conversion_time: 0,
- median_conversion_time: 0,
- count: 1,
- name: '$pageview',
- order: 0,
- type: 'events',
+ series: makeSeries({
// Breakdown must be ignored in openPersonsModalForStep
converted_people_url: '/some/people/url?funnel_step=2&funnel_step_breakdown=Latvia',
dropped_people_url: '/some/people/url?funnel_step=-2&funnel_step_breakdown=Latvia',
- droppedOffFromPrevious: 0,
- conversionRates: {
- fromPrevious: 1,
- total: 1,
- fromBasisStep: 1,
- },
- },
- step: {
- action_id: '$pageview',
- average_conversion_time: 0,
- median_conversion_time: 0,
- count: 1,
- name: '$pageview',
- order: 0,
- type: 'events',
- // Breakdown must be ignored in openPersonsModalForStep
+ }),
+ step: makeStep({
converted_people_url: '/some/people/url?funnel_step=2&funnel_step_breakdown=USA',
dropped_people_url: '/some/people/url?funnel_step=-2&funnel_step_breakdown=USA',
- },
+ }),
converted: true,
})
expect(openPersonsModal).toHaveBeenCalledWith(
expect.objectContaining({
title: expect.any(Object),
-
query: expect.objectContaining({ kind: 'FunnelsActorsQuery', funnelStep: 1 }),
})
)
})
+
+ test('openPersonsModalForSeries forwards the previous-period compare label', async () => {
+ logic.actions.openPersonsModalForSeries({
+ series: makeSeries({ order: 1, compare_label: 'previous' }),
+ step: makeStep({ order: 1 }),
+ converted: true,
+ })
+
+ expect(openPersonsModal).toHaveBeenCalledWith(
+ expect.objectContaining({
+ query: expect.objectContaining({ kind: 'FunnelsActorsQuery', compare: 'previous' }),
+ })
+ )
+ })
+
+ test('openPersonsModalForSeries forwards the current-period compare label', async () => {
+ logic.actions.openPersonsModalForSeries({
+ series: makeSeries({ order: 1, compare_label: 'current' }),
+ step: makeStep({ order: 1 }),
+ converted: true,
+ })
+
+ expect(openPersonsModal).toHaveBeenCalledWith(
+ expect.objectContaining({
+ query: expect.objectContaining({ kind: 'FunnelsActorsQuery', compare: 'current' }),
+ })
+ )
+ })
+
+ test('openPersonsModalForSeries omits compare for a non-compare funnel', async () => {
+ logic.actions.openPersonsModalForSeries({
+ series: makeSeries({ order: 1 }),
+ step: makeStep({ order: 1 }),
+ converted: true,
+ })
+
+ const { query } = (openPersonsModal as jest.Mock).mock.calls[0][0]
+ expect(query.compare).toBeUndefined()
+ })
+ })
+
+ describe('it never opens the modal for a first-step drop-off', () => {
+ const props = { dashboardItemId: Insight123 }
+ beforeEach(async () => {
+ await initFunnelPersonsModalLogic(props)
+ await expectLogic().toDispatchActions(preflightLogic, ['loadPreflightSuccess'])
+ await expectLogic(() => {
+ router.actions.push(urls.insightEdit(Insight123))
+ })
+ })
+
+ // There is no "dropped off before step 1": funnelStep would be -1, which the backend rejects
+ // with a ValueError. In compare mode the rescaled first bar can expose a clickable drop-off
+ // track, so this path is reachable and must no-op.
+ test('openPersonsModalForSeries no-ops on the first step drop-off', async () => {
+ logic.actions.openPersonsModalForSeries({
+ series: makeSeries({ order: 0, compare_label: 'current' }),
+ step: makeStep({ order: 0 }),
+ converted: false,
+ })
+
+ expect(openPersonsModal).not.toHaveBeenCalled()
+ })
+
+ test('openPersonsModalForStep no-ops on the first step drop-off', async () => {
+ logic.actions.openPersonsModalForStep({
+ step: makeStep({ order: 0 }),
+ converted: false,
+ })
+
+ expect(openPersonsModal).not.toHaveBeenCalled()
+ })
+
+ // The guard must only suppress step 1; a genuine drop-off (step 2+) still opens with funnelStep -2.
+ test('a later-step drop-off still opens with a negative funnelStep', async () => {
+ logic.actions.openPersonsModalForSeries({
+ series: makeSeries({ order: 1, compare_label: 'previous' }),
+ step: makeStep({ order: 1 }),
+ converted: false,
+ })
+
+ expect(openPersonsModal).toHaveBeenCalledWith(
+ expect.objectContaining({
+ query: expect.objectContaining({ kind: 'FunnelsActorsQuery', funnelStep: -2, compare: 'previous' }),
+ })
+ )
+ })
})
})
diff --git a/frontend/src/scenes/funnels/funnelPersonsModalLogic.ts b/frontend/src/scenes/funnels/funnelPersonsModalLogic.ts
index bb84ae5fc0d6..72a5b3b9ffdd 100644
--- a/frontend/src/scenes/funnels/funnelPersonsModalLogic.ts
+++ b/frontend/src/scenes/funnels/funnelPersonsModalLogic.ts
@@ -106,6 +106,12 @@ export const funnelPersonsModalLogic = kea<funnelPersonsModalLogicType>([
openPersonsModalForStep: ({ step, stepIndex, converted }) => {
// Note - when in a legend the step.order is always 0 so we use stepIndex instead
const stepNo = typeof stepIndex === 'number' ? stepIndex + 1 : step.order + 1
+ // There is no drop-off before the first step — funnelStep -1 is invalid and the backend
+ // rejects it. In compare mode the rescaled first bar can expose a clickable drop-off track,
+ // so ignore that click instead of firing a query that 500s.
+ if (!converted && stepNo === 1) {
+ return
+ }
const title = funnelTitle({
converted,
step: stepNo,
@@ -125,6 +131,10 @@ export const funnelPersonsModalLogic = kea<funnelPersonsModalLogicType>([
},
openPersonsModalForSeries: ({ step, series, converted }) => {
const stepNo = step.order + 1
+ // See openPersonsModalForStep: a first-step drop-off (funnelStep -1) is invalid.
+ if (!converted && stepNo === 1) {
+ return
+ }
const breakdownValues = getBreakdownStepValues(series, series.order)
const title = funnelTitle({
converted,
@@ -141,6 +151,8 @@ export const funnelPersonsModalLogic = kea<funnelPersonsModalLogicType>([
source: values.querySource!,
funnelStep: converted ? stepNo : -stepNo,
funnelStepBreakdown: series.breakdown_value === 'Baseline' ? null : series.breakdown_value,
+ // In compare mode each bar belongs to one period; scope its actors to that period.
+ compare: series.compare_label,
includeRecordings: true,
}
openPersonsModal({ title, query, additionalSelect: { matched_recordings: 'matched_recordings' } })
diff --git a/posthog/hogql_queries/insights/funnels/funnels_query_runner.py b/posthog/hogql_queries/insights/funnels/funnels_query_runner.py
index 1f3abf19730f..1c3af9300779 100644
--- a/posthog/hogql_queries/insights/funnels/funnels_query_runner.py
+++ b/posthog/hogql_queries/insights/funnels/funnels_query_runner.py
@@ -11,6 +11,7 @@ import posthoganalytics
from posthog.schema import (
CachedFunnelsQueryResponse,
+ Compare,
DateRange,
FunnelsQuery,
FunnelsQueryResponse,
@@ -114,6 +115,13 @@ class FunnelsQueryRunner(AnalyticsQueryRunner[FunnelsQueryResponse]):
return self.funnel_class.get_query()
def to_actors_query(self) -> ast.SelectQuery:
+ # A persons modal opened from a 'previous' compare bar must return actors from the shifted
+ # window only; every other case uses the source's own (current) date range.
+ actors_query = self.context.actorsQuery
+ if actors_query is not None and actors_query.compare == Compare.PREVIOUS:
+ previous_context = self._previous_period_context()
+ previous_context.actorsQuery = actors_query
+ return self._actor_class_for_context(previous_context).actor_query()
return self.funnel_actor_class.actor_query()
def _calculate(self):
@@ -428,7 +436,11 @@ class FunnelsQueryRunner(AnalyticsQueryRunner[FunnelsQueryResponse]):
)
def _build_previous_funnel(self):
- """Construct a funnel (matching the current viz mode) pinned to the previous-period range.
+ """Construct a funnel (matching the current viz mode) pinned to the previous-period range."""
+ return self._funnel_class_for_context(self._previous_period_context())
+
+ def _previous_period_context(self) -> FunnelQueryContext:
+ """A query context pinned to the previous-period range.
The previous query is a clone of `self.query` with its `dateRange` swapped for the
shifted range and `compareFilter` cleared (to prevent infinite recursion if the cloned
@@ -446,14 +458,13 @@ class FunnelsQueryRunner(AnalyticsQueryRunner[FunnelsQueryResponse]):
"compareFilter": None,
}
)
- previous_context = FunnelQueryContext(
+ return FunnelQueryContext(
query=previous_query,
team=self.team,
timings=self.timings,
modifiers=self.modifiers,
limit_context=self.limit_context,
)
- return self._funnel_class_for_context(previous_context)
def _funnel_class_for_context(self, context: FunnelQueryContext):
funnelVizType = context.funnelsFilter.funnelVizType
@@ -463,6 +474,12 @@ class FunnelsQueryRunner(AnalyticsQueryRunner[FunnelsQueryResponse]):
return FunnelTimeToConvertUDF(context=context)
return FunnelUDF(context=context)
+ def _actor_class_for_context(self, context: FunnelQueryContext):
+ # Actors for TIME_TO_CONVERT come from the plain step funnel (FunnelUDF), not the histogram class.
+ if context.funnelsFilter.funnelVizType == FunnelVizType.TRENDS:
+ return FunnelTrendsUDF(context=context)
+ return FunnelUDF(context=context)
+
def _is_compare_active(self) -> bool:
compare_filter = self.query.compareFilter
if compare_filter is None or not compare_filter.compare:
@@ -509,10 +526,7 @@ class FunnelsQueryRunner(AnalyticsQueryRunner[FunnelsQueryResponse]):
@cached_property
def funnel_actor_class(self):
- if self.context.funnelsFilter.funnelVizType == FunnelVizType.TRENDS:
- return FunnelTrendsUDF(context=self.context)
-
- return FunnelUDF(context=self.context)
+ return self._actor_class_for_context(self.context)
@property
def exact_timerange(self):
diff --git a/posthog/hogql_queries/insights/funnels/test/test_funnel_persons.py b/posthog/hogql_queries/insights/funnels/test/test_funnel_persons.py
index 6794e7705325..2502d6d8cf71 100644
--- a/posthog/hogql_queries/insights/funnels/test/test_funnel_persons.py
+++ b/posthog/hogql_queries/insights/funnels/test/test_funnel_persons.py
@@ -11,7 +11,9 @@ from posthog.test.base import (
also_test_with_materialized_columns,
snapshot_clickhouse_queries,
)
+from unittest.mock import patch
+from django.test import override_settings
from django.utils import timezone
from parameterized import parameterized
@@ -20,6 +22,8 @@ from posthog.schema import (
ActorsQuery,
BaseMathType,
BreakdownFilter,
+ Compare,
+ CompareFilter,
DateRange,
EventsNode,
FunnelsActorsQuery,
@@ -29,6 +33,7 @@ from posthog.schema import (
)
from posthog.hogql_queries.actors_query_runner import ActorsQueryRunner
+from posthog.hogql_queries.insights.funnels.funnels_query_runner import FunnelsQueryRunner
from posthog.models.event.util import bulk_create_events
from posthog.models.person.util import bulk_create_persons
from posthog.models.team.team import Team
@@ -49,6 +54,7 @@ def get_actors(
funnel_trends_entrance_period_start: Optional[str] = None,
offset: Optional[int] = None,
include_recordings: bool = False,
+ compare: Optional[Compare] = None,
) -> list[list]:
funnel_actors_query = FunnelsActorsQuery(
source=funnels_query,
@@ -57,6 +63,7 @@ def get_actors(
funnelTrendsDropOff=funnel_trends_drop_off,
funnelTrendsEntrancePeriodStart=funnel_trends_entrance_period_start,
includeRecordings=include_recordings,
+ compare=compare,
)
actors_query = ActorsQuery(
source=funnel_actors_query,
@@ -893,3 +900,131 @@ class TestFunnelSessionActors(ClickhouseTestMixin, APIBaseTest):
response = ActorsQueryRunner(query=actors_query, team=self.team).calculate()
assert len(response.results) == 0
+
+
+@override_settings(IN_UNIT_TESTING=True)
+class TestFunnelComparePersons(ClickhouseTestMixin, APIBaseTest):
+ def _compare_query(self, compare_to: Optional[str] = None) -> FunnelsQuery:
+ return FunnelsQuery(
+ dateRange=DateRange(date_from="2021-06-07 00:00:00", date_to="2021-06-13 23:59:59"),
+ interval="day",
+ series=[EventsNode(event="step one"), EventsNode(event="step two")],
+ funnelsFilter=FunnelsFilter(
+ funnelVizType=FunnelVizType.STEPS,
+ funnelWindowInterval=7,
+ funnelWindowIntervalUnit="day",
+ ),
+ compareFilter=CompareFilter(compare=True, compare_to=compare_to),
+ )
+
+ def _seed_two_periods(self) -> None:
+ # Current window 2021-06-07..06-13 holds one converter; the default previous window
+ # (prior 7 days, 2021-05-31..06-06) holds two. Distinct counts make the period the
+ # actors query scoped to unambiguous: 1=current, 2=previous, 3=combined (a bug).
+ journeys_for(
+ {
+ "current_user": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 8, 10)},
+ {"event": "step two", "timestamp": datetime(2021, 6, 8, 11)},
+ ],
+ "previous_user_a": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 1, 10)},
+ {"event": "step two", "timestamp": datetime(2021, 6, 1, 11)},
+ ],
+ "previous_user_b": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 2, 10)},
+ {"event": "step two", "timestamp": datetime(2021, 6, 2, 11)},
+ ],
+ },
+ self.team,
+ )
+
+ def test_previous_period_bar_returns_previous_period_actors(self):
+ self._seed_two_periods()
+
+ results = get_actors(self._compare_query(), self.team, funnel_step=1, compare=Compare.PREVIOUS)
+
+ self.assertEqual(len(results), 2)
+
+ def _seed_converters_and_dropoffs(self) -> None:
+ # Current window 2021-06-07..06-13: 1 full conversion + 1 drop-off after step one.
+ # Previous window 2021-05-31..06-06: 2 full conversions + 1 drop-off after step one.
+ # Period-distinct totals at every step pin which window the actors query scoped to.
+ journeys_for(
+ {
+ "current_converter": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 8, 10)},
+ {"event": "step two", "timestamp": datetime(2021, 6, 8, 11)},
+ ],
+ "current_dropoff": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 9, 10)},
+ ],
+ "previous_converter_a": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 1, 10)},
+ {"event": "step two", "timestamp": datetime(2021, 6, 1, 11)},
+ ],
+ "previous_converter_b": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 2, 10)},
+ {"event": "step two", "timestamp": datetime(2021, 6, 2, 11)},
+ ],
+ "previous_dropoff": [
+ {"event": "step one", "timestamp": datetime(2021, 6, 3, 10)},
+ ],
+ },
+ self.team,
+ )
+
+ @parameterized.expand(
+ [
+ ("current_entrants", Compare.CURRENT, 1, 2),
+ ("current_converted", Compare.CURRENT, 2, 1),
+ ("current_dropoff", Compare.CURRENT, -2, 1),
+ ("previous_entrants", Compare.PREVIOUS, 1, 3),
+ ("previous_converted", Compare.PREVIOUS, 2, 2),
+ ("previous_dropoff", Compare.PREVIOUS, -2, 1),
+ ]
+ )
+ def test_period_scoping_across_step_types(
+ self, _name: str, compare: Compare, funnel_step: int, expected_count: int
+ ) -> None:
+ self._seed_converters_and_dropoffs()
+
+ results = get_actors(self._compare_query(), self.team, funnel_step=funnel_step, compare=compare)
+
+ self.assertEqual(expected_count, len(results))
+
+ @patch("posthoganalytics.feature_enabled", return_value=True)
+ def test_actor_count_matches_bar_count(self, _feature_enabled) -> None:
+ self._seed_converters_and_dropoffs()
+ query = self._compare_query()
+
+ rows = FunnelsQueryRunner(query=query, team=self.team).calculate().results
+ bar_count = {(row["compare_label"], row["order"]): row["count"] for row in rows}
+
+ # The number of actors behind each bar must equal the count rendered on that bar.
+ for compare in (Compare.CURRENT, Compare.PREVIOUS):
+ label = compare.value
+ for order, funnel_step in ((0, 1), (1, 2)):
+ actors = get_actors(query, self.team, funnel_step=funnel_step, compare=compare)
+ self.assertEqual(
+ bar_count[(label, order)],
+ len(actors),
+ f"{label} step {funnel_step} actor count must match the bar count",
+ )
+
+ def test_non_compare_actors_unchanged(self) -> None:
+ # A funnel without compare must ignore the period field and return its single-range actors.
+ self._seed_converters_and_dropoffs()
+ query = FunnelsQuery(
+ dateRange=DateRange(date_from="2021-06-07 00:00:00", date_to="2021-06-13 23:59:59"),
+ interval="day",
+ series=[EventsNode(event="step one"), EventsNode(event="step two")],
+ funnelsFilter=FunnelsFilter(
+ funnelVizType=FunnelVizType.STEPS,
+ funnelWindowInterval=7,
+ funnelWindowIntervalUnit="day",
+ ),
+ )
+
+ self.assertEqual(len(get_actors(query, self.team, funnel_step=1)), 2)
+ self.assertEqual(len(get_actors(query, self.team, funnel_step=2)), 1)
diff --git a/posthog/schema.py b/posthog/schema.py
index b60c45a5245b..297b94b4eee3 100644
--- a/posthog/schema.py
+++ b/posthog/schema.py
@@ -24793,6 +24793,14 @@ class FunnelsActorsQuery(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
+ compare: Compare | None = Field(
+ default=None,
+ description=(
+ "When the source funnel has compare-to-previous enabled, scopes the actors"
+ " to a single period. The runner resolves `'previous'` to the shifted date"
+ " range; `'current'` (or unset) uses the source's own date range."
+ ),
+ )
funnelStep: int | None = Field(
default=None,
description=(
diff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.ts
index 29dea65ad26c..d9d020b96ea6 100644
--- a/products/dashboards/frontend/generated/api.schemas.ts
+++ b/products/dashboards/frontend/generated/api.schemas.ts
@@ -4997,6 +4997,8 @@ export interface PersonsNodeApi {
}
export interface FunnelsActorsQueryApi {
+ /** When the source funnel has compare-to-previous enabled, scopes the actors to a single period. The runner resolves `'previous'` to the shifted date range; `'current'` (or unset) uses the source's own date range. */
+ compare?: CompareApi | null
/** Index of the step for which we want to get the timestamp for, per person. Positive for converted persons, negative for dropped of persons. */
funnelStep?: number | null
/** The breakdown value for which to get persons for. This is an array for person and event properties, a string for groups and an integer for cohorts. */
diff --git a/products/product_analytics/frontend/generated/api.schemas.ts b/products/product_analytics/frontend/generated/api.schemas.ts
index 81768c9ce921..114e28af9dbb 100644
--- a/products/product_analytics/frontend/generated/api.schemas.ts
+++ b/products/product_analytics/frontend/generated/api.schemas.ts
@@ -4398,6 +4398,8 @@ export interface PersonsNodeApi {
}
export interface FunnelsActorsQueryApi {
+ /** When the source funnel has compare-to-previous enabled, scopes the actors to a single period. The runner resolves `'previous'` to the shifted date range; `'current'` (or unset) uses the source's own date range. */
+ compare?: CompareApi | null
/** Index of the step for which we want to get the timestamp for, per person. Positive for converted persons, negative for dropped of persons. */
funnelStep?: number | null
/** The breakdown value for which to get persons for. This is an array for person and event properties, a string for groups and an integer for cohorts. */
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 5b0e122f5167..fbb4893cc8dc 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -3483,6 +3483,8 @@ export namespace Schemas {
}
export interface FunnelsActorsQuery {
+ /** When the source funnel has compare-to-previous enabled, scopes the actors to a single period. The runner resolves `'previous'` to the shifted date range; `'current'` (or unset) uses the source's own date range. */
+ compare?: Compare | null;
/** Index of the step for which we want to get the timestamp for, per person. Positive for converted persons, negative for dropped of persons. */
funnelStep?: number | null;
/** The breakdown value for which to get persons for. This is an array for person and event properties, a string for groups and an integer for cohorts. */