: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(funnels): breakdown × compare for funnel steps viz (#64802)
Thomas Obermüller933c68e3c0c0
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex d99226685e4c..b62b126c134c 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -2388,6 +2388,10 @@ snapshots:hash: v1.k794b7964.ed8dcfd0398a52a184600b34416183c0e4f7db42860db1fed3e3631b31819a9c.VemuVUNUEgJsYOIWX8UgRIlBSIs9GeBXCSJsTV8nzAginsights-funnelbarhorizontalchart--default-narrow--light:hash: v1.k794b7964.b6543758ca04b2e970af5d54a370ba18ced44e9ae8fc75814f19392942db7abc.y9qjx5SS8j1iMTyUqdHLGqjEZuGfzS23ao2GcioBRUc+ insights-funnelbarhorizontalchart--funnel-top-to-bottom-breakdown-compare--dark:+ hash: v1.k794b7964.e796992fbefdd3191e1ba79e60c77736a44741800bcf1449be26e6a13f7553c3.W-5yUtMfns_MAz8EcRrzSYEaJEKAttc_lzSc2fVESLE+ insights-funnelbarhorizontalchart--funnel-top-to-bottom-breakdown-compare--light:+ hash: v1.k794b7964.75ef16cea8a014fe7cd3a01b8962c91de81ba9d4b3bc7378e090caa2047ad4dc.R_kwF04YcEG0ODevUS8jJb1jDAng3JWl3_RbuT0kURkinsights-funnelbarhorizontalchart--funnel-top-to-bottom-compare--dark:hash: v1.k794b7964.72d237b21ff6966313ce6117b09181395d56a21f3826cd06eb7de95d118389d4.aTEfL9HGvWY3WO-TKr-bs8nvdEuVWauwCh3BWg4n7iUinsights-funnelbarhorizontalchart--funnel-top-to-bottom-compare--light:@@ -2432,6 +2436,14 @@ snapshots:hash: v1.k794b7964.24231a6c0aa897026ddab3516709f6b5b63f78ba31cde438f8d05d48eed3f580.AhJlZ_9B4fS1-k9KjUe5Rpm5EhXFg-tDGcebGbLSaZ0insights-funnelstepsbarchart--breakdown--light:hash: v1.k794b7964.d251129665fb4a0cd45c06d2ab7186b4c5e2f70cadc2a24351f400c8b6e2d122.M4Ps9X0HSaPRWazFcYZAU9fHv56ShPenJcRtk7Bakd4+ insights-funnelstepsbarchart--breakdown-and-compare--dark:+ hash: v1.k794b7964.b61959316021ea8cbf21ff7c425a3b58c8c502bfff8c862cc0bb2947f6f28473.CIijpnagLBbNi_-hphYo03M_c6lxDQmfBjW-1uBjS10+ insights-funnelstepsbarchart--breakdown-and-compare--light:+ hash: v1.k794b7964.8761cb5f23b7368c5765b2a570c05f1fb32ee8185987b47404b0df383f54bde8.DYW47or6IzDPEt1o5wofB3lX-jbZ0F1-3n0-1SuIGhs+ insights-funnelstepsbarchart--compare--dark:+ hash: v1.k794b7964.1345d85fb01c520cb48b23af3c601d0f9eb6bed0ac6cf16d6241c02e2bed7172.KwYwgZ7U_QH7KYIUG0zl7uUmP2Jw9KYcHZqjQD_PYJk+ insights-funnelstepsbarchart--compare--light:+ hash: v1.k794b7964.a63240be8440e7a836ef058d0357b68ad56f87c260ccf147865c2fb2c495656e.ugIoHV6W-pMCpJys198JQiEWjpyF-xBz5ASqcsCbbqcinsights-funnelstepsbarchart--default--dark:hash: v1.k794b7964.7d34454430cfb4586695de29f16bfa7c93e39f3f0b3694d0b341de711b829f5f.Me8dOXwJ_ZztmRu1eL3TOOjdr_rG1UN8oU6Kd-3IPZUinsights-funnelstepsbarchart--default--light:diff --git a/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdownCompare.json b/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdownCompare.jsonnew file mode 100644index 000000000000..8cd7b1738ed3--- /dev/null+++ b/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdownCompare.json@@ -0,0 +1,457 @@+{+ "id": 51,+ "short_id": "jEAIVJnE",+ "name": null,+ "derived_name": "Pageview \u2192 Pageview \u2192 Pageview user conversion rate by null",+ "filters": {},+ "filters_hash": "cache_e89d6f521a617fce49e2c8d69ab807e4",+ "order": null,+ "deleted": false,+ "dashboard": null,+ "layouts": {},+ "color": null,+ "last_refresh": null,+ "refreshing": false,+ "result": [+ [+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 0,+ "people": [],+ "count": 597,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "92"+ ],+ "breakdown_value": [+ "92"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=1&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": null,+ "compare_label": "current"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 1,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": 0,+ "median_conversion_time": 0,+ "breakdown": [+ "92"+ ],+ "breakdown_value": [+ "92"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "current"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 2,+ "people": [],+ "count": 0,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "92"+ ],+ "breakdown_value": [+ "92"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "current"+ }+ ],+ [+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 0,+ "people": [],+ "count": 19568,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "100"+ ],+ "breakdown_value": [+ "100"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=1&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": null,+ "compare_label": "current"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 1,+ "people": [],+ "count": 8436,+ "type": "events",+ "average_conversion_time": 370.4660714933768,+ "median_conversion_time": 0,+ "breakdown": [+ "100"+ ],+ "breakdown_value": [+ "100"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "current"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 2,+ "people": [],+ "count": 2863,+ "type": "events",+ "average_conversion_time": 398.24871074618267,+ "median_conversion_time": 0,+ "breakdown": [+ "100"+ ],+ "breakdown_value": [+ "100"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "current"+ }+ ],+ [+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 0,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "98"+ ],+ "breakdown_value": [+ "98"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=1&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": null,+ "compare_label": "current"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 1,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": 930.7985074626865,+ "median_conversion_time": 2,+ "breakdown": [+ "98"+ ],+ "breakdown_value": [+ "98"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "current"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 2,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": 930.0074626865671,+ "median_conversion_time": 2,+ "breakdown": [+ "98"+ ],+ "breakdown_value": [+ "98"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "current"+ }+ ],+ [+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 0,+ "people": [],+ "count": 418,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "92"+ ],+ "breakdown_value": [+ "92"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=1&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": null,+ "compare_label": "previous"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 1,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": 0,+ "median_conversion_time": 0,+ "breakdown": [+ "92"+ ],+ "breakdown_value": [+ "92"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "previous"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 2,+ "people": [],+ "count": 0,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "92"+ ],+ "breakdown_value": [+ "92"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2292%22%5D&funnel_step=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "previous"+ }+ ],+ [+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 0,+ "people": [],+ "count": 13698,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "100"+ ],+ "breakdown_value": [+ "100"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=1&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": null,+ "compare_label": "previous"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 1,+ "people": [],+ "count": 5905,+ "type": "events",+ "average_conversion_time": 370.4660714933768,+ "median_conversion_time": 0,+ "breakdown": [+ "100"+ ],+ "breakdown_value": [+ "100"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "previous"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 2,+ "people": [],+ "count": 2004,+ "type": "events",+ "average_conversion_time": 398.24871074618267,+ "median_conversion_time": 0,+ "breakdown": [+ "100"+ ],+ "breakdown_value": [+ "100"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%22100%22%5D&funnel_step=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "previous"+ }+ ],+ [+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 0,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": null,+ "median_conversion_time": null,+ "breakdown": [+ "98"+ ],+ "breakdown_value": [+ "98"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=1&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": null,+ "compare_label": "previous"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 1,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": 930.7985074626865,+ "median_conversion_time": 2,+ "breakdown": [+ "98"+ ],+ "breakdown_value": [+ "98"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "previous"+ },+ {+ "action_id": "$pageview",+ "name": "$pageview",+ "custom_name": null,+ "order": 2,+ "people": [],+ "count": 1,+ "type": "events",+ "average_conversion_time": 930.0074626865671,+ "median_conversion_time": 2,+ "breakdown": [+ "98"+ ],+ "breakdown_value": [+ "98"+ ],+ "converted_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "dropped_people_url": "/api/person/funnel/?breakdown=%5B%22%24browser_version%22%5D&breakdowns=%5B%7B%22type%22%3A+%22event%22%2C+%22property%22%3A+%22%24browser_version%22%7D%5D&breakdown_type=event&date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A44%3A11.626841%2B00%3A00&display=FunnelViz&events=%5B%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+0%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+1%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%2C+%7B%22id%22%3A+%22%24pageview%22%2C+%22type%22%3A+%22events%22%2C+%22order%22%3A+2%2C+%22name%22%3A+%22%24pageview%22%2C+%22custom_name%22%3A+null%2C+%22math%22%3A+null%2C+%22math_property%22%3A+null%2C+%22math_group_type_index%22%3A+null%2C+%22properties%22%3A+%7B%7D%7D%5D&funnel_step_breakdown=%5B%2298%22%5D&funnel_step=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100",+ "compare_label": "previous"+ }+ ]+ ],+ "created_at": "2022-03-15T21:31:00.192917Z",+ "created_by": {+ "id": 1,+ "uuid": "017f7913-c1ee-0000-faff-0fe5ace3849a",+ "distinct_id": "Q1OD2NmnqqbqrLR45mYm2p1VNNbSO9DBFsMig90GWkK",+ "first_name": "Marius",+ "email": "[email protected]"+ },+ "description": "",+ "updated_at": "2022-03-15T21:44:14.682234Z",+ "tags": [],+ "favorited": false,+ "saved": true,+ "last_modified_at": "2022-03-15T21:44:14.676985Z",+ "last_modified_by": {+ "id": 1,+ "uuid": "017f7913-c1ee-0000-faff-0fe5ace3849a",+ "distinct_id": "Q1OD2NmnqqbqrLR45mYm2p1VNNbSO9DBFsMig90GWkK",+ "first_name": "Marius",+ "email": "[email protected]"+ },+ "is_sample": false,+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "breakdownFilter": {+ "breakdown": "$browser_version",+ "breakdown_type": "event"+ },+ "funnelsFilter": {+ "exclusions": [],+ "funnelVizType": "steps",+ "layout": "horizontal"+ },+ "interval": "day",+ "kind": "FunnelsQuery",+ "properties": {+ "type": "AND",+ "values": [+ {+ "type": "AND",+ "values": []+ }+ ]+ },+ "series": [+ {+ "event": "$pageview",+ "kind": "EventsNode",+ "name": "$pageview"+ },+ {+ "event": "$pageview",+ "kind": "EventsNode",+ "name": "$pageview"+ },+ {+ "event": "$pageview",+ "kind": "EventsNode",+ "name": "$pageview"+ }+ ],+ "compareFilter": {+ "compare": true+ }+ },+ "full": true+ }+}\ No newline at end of filediff --git a/frontend/src/scenes/funnels/FunnelTooltip.tsx b/frontend/src/scenes/funnels/FunnelTooltip.tsxindex 74dd1caebd20..63d455a72524 100644--- a/frontend/src/scenes/funnels/FunnelTooltip.tsx+++ b/frontend/src/scenes/funnels/FunnelTooltip.tsx@@ -22,7 +22,7 @@ import { FunnelStepWithConversionMetrics } from '~/types'import { funnelDataLogic } from './funnelDataLogic'import { funnelTooltipLogic } from './funnelTooltipLogic'-import { funnelComparePeriodDateRange } from './funnelUtils'+import { funnelComparePeriodDateRange, funnelTooltipHeaderLabel, hasBreakdown } from './funnelUtils'/** The tooltip is offset horizontally by a few pixels from the bar to give it some breathing room. */const FUNNEL_TOOLTIP_OFFSET_PX = 4@@ -62,16 +62,21 @@ export function FunnelTooltip({<strong><EntityFilterInfo filter={getActionFilterFromFunnelStep(series)} allowWrap /><span className="mx-1">•</span>- {series.compare_label- ? `${series.compare_label === 'current' ? 'Current' : 'Previous'}${- comparePeriodDateRange ? ` (${comparePeriodDateRange})` : ''- }`- : formatBreakdownLabel(- series.breakdown_value,- breakdownFilter,- allCohorts.results,- formatPropertyValueForDisplay- )}+ {funnelTooltipHeaderLabel({+ // Pure compare bars (no real breakdown) show only the period; breakdown and+ // breakdown + compare bars show the breakdown value (plus the period if any).+ breakdownLabel:+ !series.compare_label || hasBreakdown(series.breakdown_value)+ ? formatBreakdownLabel(+ series.breakdown_value,+ breakdownFilter,+ allCohorts.results,+ formatPropertyValueForDisplay+ )+ : null,+ compareLabel: series.compare_label,+ comparePeriodDateRange,+ })}</strong></LemonRow><LemonDivider className="my-2" />diff --git a/frontend/src/scenes/funnels/__mocks__/funnelDataLogicMocks.ts b/frontend/src/scenes/funnels/__mocks__/funnelDataLogicMocks.tsindex cd2680aefe71..3112799c5d5b 100644--- a/frontend/src/scenes/funnels/__mocks__/funnelDataLogicMocks.ts+++ b/frontend/src/scenes/funnels/__mocks__/funnelDataLogicMocks.ts@@ -516,6 +516,144 @@ export const funnelResultStepsCompare: FunnelAPIResponse = {is_cached: true,}+// The runner returns 2·N inner funnels for breakdown + compare — N current then N previous, aligned+// by breakdown value, each step tagged with compare_label. Chrome converts more than Safari.+export const funnelResultStepsBreakdownCompare: FunnelAPIResponse = {+ result: [+ [+ {+ action_id: 'sign up',+ name: 'sign up',+ order: 0,+ count: 100,+ type: 'events',+ average_conversion_time: null,+ median_conversion_time: null,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Chrome'],+ breakdown_value: ['Chrome'],+ compare_label: 'current',+ },+ {+ action_id: 'buy',+ name: 'buy',+ order: 1,+ count: 50,+ type: 'events',+ average_conversion_time: 3600,+ median_conversion_time: 1800,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Chrome'],+ breakdown_value: ['Chrome'],+ compare_label: 'current',+ },+ ],+ [+ {+ action_id: 'sign up',+ name: 'sign up',+ order: 0,+ count: 40,+ type: 'events',+ average_conversion_time: null,+ median_conversion_time: null,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Safari'],+ breakdown_value: ['Safari'],+ compare_label: 'current',+ },+ {+ action_id: 'buy',+ name: 'buy',+ order: 1,+ count: 20,+ type: 'events',+ average_conversion_time: 3600,+ median_conversion_time: 1800,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Safari'],+ breakdown_value: ['Safari'],+ compare_label: 'current',+ },+ ],+ [+ {+ action_id: 'sign up',+ name: 'sign up',+ order: 0,+ count: 80,+ type: 'events',+ average_conversion_time: null,+ median_conversion_time: null,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Chrome'],+ breakdown_value: ['Chrome'],+ compare_label: 'previous',+ },+ {+ action_id: 'buy',+ name: 'buy',+ order: 1,+ count: 30,+ type: 'events',+ average_conversion_time: 4200,+ median_conversion_time: 2100,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Chrome'],+ breakdown_value: ['Chrome'],+ compare_label: 'previous',+ },+ ],+ [+ {+ action_id: 'sign up',+ name: 'sign up',+ order: 0,+ count: 25,+ type: 'events',+ average_conversion_time: null,+ median_conversion_time: null,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Safari'],+ breakdown_value: ['Safari'],+ compare_label: 'previous',+ },+ {+ action_id: 'buy',+ name: 'buy',+ order: 1,+ count: 10,+ type: 'events',+ average_conversion_time: 4200,+ median_conversion_time: 2100,+ people: [],+ converted_people_url: '',+ dropped_people_url: null,+ breakdown: ['Safari'],+ breakdown_value: ['Safari'],+ compare_label: 'previous',+ },+ ],+ ],+ timezone: 'UTC',+ last_refresh: '2023-02-22T08:24:07.710763Z',+ is_cached: true,+}+// 1. Add step "Pageview"// 2. Add "Pageview" as exclusion stepexport const funnelInvalidExclusionError = {diff --git a/frontend/src/scenes/funnels/funnelDataLogic.test.ts b/frontend/src/scenes/funnels/funnelDataLogic.test.tsindex 9fc5486112ab..1f3dc06394cb 100644--- a/frontend/src/scenes/funnels/funnelDataLogic.test.ts+++ b/frontend/src/scenes/funnels/funnelDataLogic.test.ts@@ -11,6 +11,7 @@ import { FunnelConversionWindowTimeUnit, FunnelVizType, InsightLogicProps, Insigimport {funnelResult,+ funnelResultStepsBreakdownCompare,funnelResultStepsCompare,funnelResultTimeToConvert,funnelResultTimeToConvertCompare,@@ -22,7 +23,7 @@ import {funnelResultWithMultiBreakdown,} from './__mocks__/funnelDataLogicMocks'import { funnelDataLogic } from './funnelDataLogic'-import { dimPreviousPeriodColor } from './funnelUtils'+import { dimPreviousPeriodColor, getVisibilityKey } from './funnelUtils'let logic: ReturnType<typeof funnelDataLogic.build>let builtDataNodeLogic: ReturnType<typeof dataNodeLogic.build>@@ -1513,6 +1514,16 @@ describe('funnelDataLogic', () => {expect(previousColor).not.toBe(currentColor)})+ it('exposes no breakdown table for a pure compare funnel', async () => {+ await loadStepsCompare(funnelResultStepsCompare.result)++ // Pure compare: current/previous bars are not real breakdown values.+ expect(logic.values.isComparedFunnel).toBe(true)+ expect(logic.values.isBreakdownCompareFunnel).toBe(false)+ // So the breakdown table / flattened breakdown rows stay empty.+ expect(logic.values.flattenedBreakdowns).toEqual([])+ })+it('leaves a non-compared steps funnel unchanged (single bar per step)', async () => {const stepsQueryNoCompare: FunnelsQuery = {kind: NodeKind.FunnelsQuery,@@ -1537,4 +1548,108 @@ describe('funnelDataLogic', () => {})})})++ describe('steps breakdown compare (grouped bars)', () => {+ const stepsQuery: FunnelsQuery = {+ kind: NodeKind.FunnelsQuery,+ series: [],+ funnelsFilter: { funnelVizType: FunnelVizType.Steps },+ breakdownFilter: { breakdown: '$browser' },+ compareFilter: { compare: true },+ }++ async function loadBreakdownCompare(result: unknown): Promise<void> {+ const insight: Partial<InsightModel> = {+ filters: { insight: InsightType.FUNNELS },+ result: result as InsightModel['result'],+ }+ await expectLogic(logic, () => {+ logic.actions.updateQuerySource(stepsQuery)+ builtDataNodeLogic.actions.loadDataSuccess(insight)+ }).toFinishAllListeners()+ }++ it('pairs current+previous bars per breakdown value within each step', async () => {+ await loadBreakdownCompare(funnelResultStepsBreakdownCompare.result)++ expect(logic.values.isComparedFunnel).toBe(true)+ const steps = logic.values.visibleStepsWithConversionMetrics+ expect(steps).toHaveLength(2)++ // Chrome (current 100) outranks Safari (current 40): Chrome pair first, then Safari pair,+ // current before previous within each value.+ expect(steps[0].nested_breakdown?.map((b) => [b.breakdown_value, b.compare_label])).toEqual([+ [['Chrome'], 'current'],+ [['Chrome'], 'previous'],+ [['Safari'], 'current'],+ [['Safari'], 'previous'],+ ])+ expect(steps[0].nested_breakdown?.map((b) => b.count)).toEqual([100, 80, 40, 25])++ // The step's aggregate (shown in the legend) is the current period's total only —+ // not current+previous summed together.+ expect(steps[0].count).toBe(140) // 100 Chrome + 40 Safari+ expect(steps[1].count).toBe(70) // 50 Chrome + 20 Safari+ })++ it('colors each breakdown value distinctly and desaturates its previous-period bar', async () => {+ await loadBreakdownCompare(funnelResultStepsBreakdownCompare.result)++ const [chromeCur, chromePrev, safariCur, safariPrev] =+ logic.values.visibleStepsWithConversionMetrics[0].nested_breakdown!+ const color = logic.values.getFunnelsColor++ // Distinct hue per breakdown value...+ expect(color(chromeCur)).not.toBe(color(safariCur))+ // ...with each value's previous-period bar the same hue, desaturated.+ expect(color(chromePrev)).toBe(dimPreviousPeriodColor(color(chromeCur)))+ expect(color(safariPrev)).toBe(dimPreviousPeriodColor(color(safariCur)))+ })++ it('keeps the breakdown table populated with the real breakdown values', async () => {+ await loadBreakdownCompare(funnelResultStepsBreakdownCompare.result)++ // Breakdown + compare is distinguished from pure compare so breakdown behavior survives.+ expect(logic.values.isComparedFunnel).toBe(true)+ expect(logic.values.isBreakdownCompareFunnel).toBe(true)++ // The table is built from the current-period bars: one row per real value (Chrome,+ // Safari), not one per period — the compare periods are not breakdown values.+ const breakdownValues = logic.values.flattenedBreakdowns+ .filter((b) => !b.isBaseline)+ .map((b) => getVisibilityKey(b.breakdown_value))+ expect(breakdownValues).toEqual(['Chrome', 'Safari'])+ })++ it('hides both periods of a breakdown value when its legend entry is hidden', async () => {+ const insight: Partial<InsightModel> = {+ filters: { insight: InsightType.FUNNELS },+ result: funnelResultStepsBreakdownCompare.result as InsightModel['result'],+ }+ await expectLogic(logic, () => {+ const query: FunnelsQuery = {+ ...stepsQuery,+ funnelsFilter: { ...stepsQuery.funnelsFilter, hiddenLegendBreakdowns: ['Chrome'] },+ }+ logic.actions.updateQuerySource(query)+ builtDataNodeLogic.actions.loadDataSuccess(insight)+ }).toFinishAllListeners()++ // Hiding Chrome drops its current AND previous bars; Safari's pair remains, still grouped.+ const visibleValues = logic.values.visibleStepsWithConversionMetrics[0].nested_breakdown?.map((b) => [+ getVisibilityKey(b.breakdown_value),+ b.compare_label,+ ])+ expect(visibleValues).toEqual([+ ['Safari', 'current'],+ ['Safari', 'previous'],+ ])++ // The table still lists Chrome (just unchecked), so it can be toggled back on.+ const breakdownValues = logic.values.flattenedBreakdowns+ .filter((b) => !b.isBaseline)+ .map((b) => getVisibilityKey(b.breakdown_value))+ expect(breakdownValues).toEqual(['Chrome', 'Safari'])+ })+ })})diff --git a/frontend/src/scenes/funnels/funnelDataLogic.ts b/frontend/src/scenes/funnels/funnelDataLogic.tsindex ff818a405162..03417e8ce838 100644--- a/frontend/src/scenes/funnels/funnelDataLogic.ts+++ b/frontend/src/scenes/funnels/funnelDataLogic.ts@@ -43,6 +43,7 @@ import {import type { funnelDataLogicType } from './funnelDataLogicType'import {TIME_INTERVAL_BOUNDS,+ aggregateBreakdownCompareResult,aggregateBreakdownResult,aggregateFunnelCompareResult,aggregationLabelForHogQL,@@ -53,6 +54,7 @@ import {getReferenceStep,getVisibilityKey,isBreakdownFunnelResults,+ isFunnelStepsBreakdownCompareResult,isFunnelStepsCompareResult,isFunnelWithEnoughSteps,isFunnelWithIncompleteDataWarehouseStep,@@ -368,6 +370,13 @@ export const funnelDataLogic = kea<funnelDataLogicType>([const breakdownProperty = breakdownFilter?.breakdowns? breakdownFilter?.breakdowns.map((b) => b.property).join('::'): (breakdownFilter?.breakdown ?? undefined)+ // Breakdown + compare: pair each breakdown value's current and previous+ // funnels so the grouped bars share a color (previous desaturated). Must+ // precede the plain breakdown path, which would otherwise treat each period+ // as an independent breakdown value (and double-count the step aggregate).+ if (isStepsFunnel && isFunnelStepsBreakdownCompareResult(results)) {+ return aggregateBreakdownCompareResult(results, breakdownProperty)+ }return aggregateBreakdownResult(results, breakdownProperty).sort((a, b) => a.order - b.order)}return results.sort((a, b) => a.order - b.order)@@ -417,6 +426,14 @@ export const funnelDataLogic = kea<funnelDataLogicType>([Array.isArray(steps) &&steps.some((step) => step.nested_breakdown?.some((series) => series.compare_label != null)),],+ // True when a compared funnel also carries real breakdown values (breakdown × compare), as+ // opposed to a pure compare funnel whose current/previous bars are not breakdown values.+ // Pure compare is then `isComparedFunnel && !isBreakdownCompareFunnel`: the former bypasses the+ // breakdown machinery entirely, the latter keeps it (table, hidden legend) around the grouped bars.+ isBreakdownCompareFunnel: [+ (s) => [s.results, s.isStepsFunnel],+ (results, isStepsFunnel): boolean => !!isStepsFunnel && isFunnelStepsBreakdownCompareResult(results),+ ],stepsWithConversionMetrics: [(s) => [s.steps, s.funnelsFilter, s.querySource],(@@ -447,19 +464,29 @@ export const funnelDataLogic = kea<funnelDataLogicType>([s.disableFunnelBreakdownBaseline,s.breakdownSorting,s.isComparedFunnel,+ s.isBreakdownCompareFunnel,],(steps: FunnelStepWithConversionMetrics[],funnelsFilter: FunnelsFilter | null | undefined,disableBaseline: boolean,breakdownSorting: string | undefined,- isComparedFunnel: boolean+ isComparedFunnel: boolean,+ isBreakdownCompareFunnel: boolean): FlattenedFunnelStepByBreakdown[] => {- // Compare's current/previous bars are not breakdown values — no breakdown table.- if (isComparedFunnel) {+ // Pure compare's current/previous bars are not breakdown values — no breakdown table.+ if (isComparedFunnel && !isBreakdownCompareFunnel) {return []}- const breakdowns = flattenedStepsByBreakdown(steps, funnelsFilter?.layout, disableBaseline, true)+ // Breakdown + compare: build the table from the current-period bars so each real+ // breakdown value yields one row (not one row per period).+ const tableSteps = isBreakdownCompareFunnel+ ? steps.map((step) => ({+ ...step,+ nested_breakdown: step.nested_breakdown?.filter((b) => b.compare_label !== 'previous'),+ }))+ : steps+ const breakdowns = flattenedStepsByBreakdown(tableSteps, funnelsFilter?.layout, disableBaseline, true)if (!breakdownSorting) {return breakdowns}@@ -483,19 +510,38 @@ export const funnelDataLogic = kea<funnelDataLogicType>([],resultCustomizations: [(s) => [s.funnelsFilter], (funnelsFilter) => funnelsFilter?.resultCustomizations],visibleStepsWithConversionMetrics: [- (s) => [s.stepsWithConversionMetrics, s.flattenedBreakdowns, s.hiddenLegendBreakdowns, s.isComparedFunnel],+ (s) => [+ s.stepsWithConversionMetrics,+ s.flattenedBreakdowns,+ s.hiddenLegendBreakdowns,+ s.isComparedFunnel,+ s.isBreakdownCompareFunnel,+ ],(steps: FunnelStepWithConversionMetrics[],flattenedBreakdowns: FlattenedFunnelStepByBreakdown[],hiddenLegendBreakdowns: string[] | undefined,- isComparedFunnel: boolean+ isComparedFunnel: boolean,+ isBreakdownCompareFunnel: boolean): FunnelStepWithConversionMetrics[] => {- // Compare already shaped nested_breakdown into [current, previous]; skip the+ // Pure compare already shaped nested_breakdown into [current, previous]; skip the// breakdown baseline-prepend / hidden-legend reordering, which assumes real breakdowns.- if (isComparedFunnel) {+ if (isComparedFunnel && !isBreakdownCompareFunnel) {return steps}const isOnlySeries = flattenedBreakdowns.length <= 1+ // Breakdown + compare: apply hidden-legend filtering by real breakdown value, but keep+ // the grouped current/previous pairing and the shared per-value orders that drive the+ // bar colors — don't run the baseline-prepend / order-remap path below.+ if (isBreakdownCompareFunnel) {+ return steps.map((step) => ({+ ...step,+ nested_breakdown: step.nested_breakdown?.filter(+ (b) =>+ isOnlySeries || !hiddenLegendBreakdowns?.includes(getVisibilityKey(b.breakdown_value))+ ),+ }))+ }const baseLineSteps = flattenedBreakdowns.find((b) => b.isBaseline)// Build a breakdown order lookup from flattenedBreakdowns (already sorteddiff --git a/frontend/src/scenes/funnels/funnelUtils.test.ts b/frontend/src/scenes/funnels/funnelUtils.test.tsindex 2a1ae0618b7e..06c3a1e43cf5 100644--- a/frontend/src/scenes/funnels/funnelUtils.test.ts+++ b/frontend/src/scenes/funnels/funnelUtils.test.ts@@ -13,10 +13,13 @@ import {} from '~/types'import {+ aggregateBreakdownCompareResult,aggregateBreakdownResult,dimPreviousPeriodColor,EMPTY_BREAKDOWN_VALUES,funnelComparePeriodDateRange,+ funnelTooltipHeaderLabel,+ isFunnelStepsBreakdownCompareResult,getBreakdownStepValues,getClampedFunnelStepRange,getIncompleteConversionWindowStartDate,@@ -477,6 +480,117 @@ describe('aggregateBreakdownResult', () => {})})+describe('isFunnelStepsBreakdownCompareResult', () => {+ it('true for list-of-lists whose inner steps carry compare_label', () => {+ const results: FunnelStep[][] = [+ [makeStep({ count: 10, order: 0, breakdown_value: 'Chrome', compare_label: 'current' })],+ [makeStep({ count: 8, order: 0, breakdown_value: 'Chrome', compare_label: 'previous' })],+ ]+ expect(isFunnelStepsBreakdownCompareResult(results)).toBe(true)+ })++ it('false for a plain breakdown result (no compare_label)', () => {+ const results: FunnelStep[][] = [[makeStep({ count: 10, order: 0, breakdown_value: 'Chrome' })]]+ expect(isFunnelStepsBreakdownCompareResult(results)).toBe(false)+ })++ it('false for a flat (non-breakdown) compare result', () => {+ const results: FunnelStep[] = [makeStep({ count: 10, order: 0, compare_label: 'current' })]+ expect(isFunnelStepsBreakdownCompareResult(results)).toBe(false)+ })++ it('false for empty results', () => {+ expect(isFunnelStepsBreakdownCompareResult([])).toBe(false)+ })+})++describe('aggregateBreakdownCompareResult', () => {+ // 2 breakdown values × 2 periods = 4 inner funnels, the shape the runner emits for breakdown ++ // compare. Safari is listed before Chrome to prove the aggregator sorts by current count.+ const build = (): FunnelStep[][] => [+ [+ makeStep({ count: 30, order: 0, breakdown_value: 'Safari', compare_label: 'current' }),+ makeStep({ count: 10, order: 1, breakdown_value: 'Safari', compare_label: 'current' }),+ ],+ [+ makeStep({ count: 70, order: 0, breakdown_value: 'Chrome', compare_label: 'current' }),+ makeStep({ count: 40, order: 1, breakdown_value: 'Chrome', compare_label: 'current' }),+ ],+ [+ makeStep({ count: 25, order: 0, breakdown_value: 'Safari', compare_label: 'previous' }),+ makeStep({ count: 5, order: 1, breakdown_value: 'Safari', compare_label: 'previous' }),+ ],+ [+ makeStep({ count: 50, order: 0, breakdown_value: 'Chrome', compare_label: 'previous' }),+ makeStep({ count: 20, order: 1, breakdown_value: 'Chrome', compare_label: 'previous' }),+ ],+ ]++ it('returns empty array for empty input', () => {+ expect(aggregateBreakdownCompareResult([], 'browser')).toEqual([])+ })++ it('returns one step per order, each pairing current+previous bars per breakdown value', () => {+ const result = aggregateBreakdownCompareResult(build(), 'browser')++ expect(result).toHaveLength(2)+ // Ordered by current first-step count desc (Chrome 70 before Safari 30), current before+ // previous within each value.+ expect(result[0].nested_breakdown!.map((b) => [b.breakdown_value, b.compare_label])).toEqual([+ ['Chrome', 'current'],+ ['Chrome', 'previous'],+ ['Safari', 'current'],+ ['Safari', 'previous'],+ ])+ })++ it('gives current+previous of one value the same order, distinct across values', () => {+ const [chromeCur, chromePrev, safariCur, safariPrev] = aggregateBreakdownCompareResult(build(), 'browser')[0]+ .nested_breakdown!++ expect(chromeCur.order).toBe(chromePrev.order)+ expect(safariCur.order).toBe(safariPrev.order)+ expect(chromeCur.order).not.toBe(safariCur.order)+ })++ it('preserves each variant count', () => {+ const result = aggregateBreakdownCompareResult(build(), 'browser')+ expect(result[0].nested_breakdown!.map((b) => b.count)).toEqual([70, 50, 30, 25])+ expect(result[1].nested_breakdown!.map((b) => b.count)).toEqual([40, 20, 10, 5])+ })+})++describe('funnelTooltipHeaderLabel', () => {+ it('shows the breakdown value alone when there is no compare', () => {+ expect(funnelTooltipHeaderLabel({ breakdownLabel: 'Chrome' })).toBe('Chrome')+ })++ it('shows the period alone when there is no breakdown', () => {+ expect(funnelTooltipHeaderLabel({ compareLabel: 'current' })).toBe('Current')+ expect(funnelTooltipHeaderLabel({ compareLabel: 'previous' })).toBe('Previous')+ })++ it('appends the date range to the period when provided', () => {+ expect(funnelTooltipHeaderLabel({ compareLabel: 'previous', comparePeriodDateRange: 'Mar 1 – Mar 7' })).toBe(+ 'Previous (Mar 1 – Mar 7)'+ )+ })++ it('shows both breakdown value and period when both are present', () => {+ expect(+ funnelTooltipHeaderLabel({+ breakdownLabel: 'Chrome',+ compareLabel: 'current',+ comparePeriodDateRange: 'Mar 8 – Mar 15',+ })+ ).toBe('Chrome • Current (Mar 8 – Mar 15)')+ })++ it('is empty when neither is present', () => {+ expect(funnelTooltipHeaderLabel({})).toBe('')+ })+})+describe('stepsWithConversionMetrics', () => {const makeNestedStep = (overrides: Partial<FunnelStepWithNestedBreakdown> & { count: number; order: number }diff --git a/frontend/src/scenes/funnels/funnelUtils.tsx b/frontend/src/scenes/funnels/funnelUtils.tsxindex 4b4791dc3cf5..ef6ebc3e6052 100644--- a/frontend/src/scenes/funnels/funnelUtils.tsx+++ b/frontend/src/scenes/funnels/funnelUtils.tsx@@ -178,7 +178,8 @@ export function isBreakdownFunnelResults(results: FunnelResultType): results is}/** Whether a STEPS result is a compare-tagged flat list (both periods' steps tagged with- * `compare_label`, no breakdown). Breakdown compare lands in a later slice. */+ * `compare_label`, no breakdown). Breakdown + compare is a list-of-lists — see+ * `isFunnelStepsBreakdownCompareResult`. */export function isFunnelStepsCompareResult(results: FunnelResultType): results is FunnelStep[] {return (Array.isArray(results) &&@@ -188,6 +189,17 @@ export function isFunnelStepsCompareResult(results: FunnelResultType): results i)}+/** Whether a STEPS result is a breakdown + compare result — a list of inner funnels (one per+ * breakdown value, per period) whose steps carry `compare_label`. The runner emits 2·N such inner+ * funnels; `aggregateBreakdownCompareResult` pairs them by breakdown value. */+export function isFunnelStepsBreakdownCompareResult(results: FunnelResultType): results is FunnelStep[][] {+ return (+ isBreakdownFunnelResults(results) &&+ results.length > 0 &&+ (results[0] as FunnelStep[]).some((step) => step.compare_label != null)+ )+}+const COMPARE_TO_UNIT: Record<string, dayjs.ManipulateType> = {h: 'hour',d: 'day',@@ -232,6 +244,26 @@ export function funnelComparePeriodDateRange(return formatDateRange(previousFrom, previousTo)}+/** Compose the funnel tooltip header from the parts a series carries: its breakdown value, its+ * compare period (optionally with a date range), or both joined — so breakdown + compare bars are+ * labelled with both which value and which period they represent. */+export function funnelTooltipHeaderLabel({+ breakdownLabel,+ compareLabel,+ comparePeriodDateRange,+}: {+ breakdownLabel?: string | null+ compareLabel?: 'current' | 'previous'+ comparePeriodDateRange?: string | null+}): string {+ const periodLabel = compareLabel+ ? `${compareLabel === 'current' ? 'Current' : 'Previous'}${+ comparePeriodDateRange ? ` (${comparePeriodDateRange})` : ''+ }`+ : null+ return [breakdownLabel || null, periodLabel].filter(Boolean).join(' • ')+}+/** Desaturate a series color to the "previous period" treatment (50% opacity), matching the* dimmed previous-period series in trends (`LineGraph.processDataset`). */export function dimPreviousPeriodColor(color: string): string {@@ -261,6 +293,74 @@ export function aggregateFunnelCompareResult(results: FunnelStep[]): FunnelStepW}))}+/**+ * Reshape a breakdown + compare STEPS result (2·N inner funnels — one per breakdown value, per+ * period) into one step per order, each carrying a `nested_breakdown` that pairs the current and+ * previous bar for every breakdown value: `[A_current, A_previous, B_current, B_previous, …]`.+ *+ * Both bars of a value share an `order` so they resolve to the same breakdown color (the previous+ * one is then desaturated via its `compare_label`), while distinct values get distinct orders and+ * colors. Values are ordered by current first-step count descending, matching the non-compare+ * breakdown path.+ */+export function aggregateBreakdownCompareResult(+ results: FunnelStep[][],+ breakdownProperty?: BreakdownKeyType+): FunnelStepWithNestedBreakdown[] {+ const groups = results.filter((group) => group.length > 0)+ if (!groups.length) {+ return []+ }++ const valueKey = (group: FunnelStep[]): string => getBreakdownStepValues(group[0], -1).breakdown_value.join('_')++ const currentByValue = new Map<string, FunnelStep[]>()+ const previousByValue = new Map<string, FunnelStep[]>()+ for (const group of groups) {+ const target = group[0].compare_label === 'previous' ? previousByValue : currentByValue+ target.set(valueKey(group), group)+ }++ // Union of breakdown values across periods, ordered by current first-step count descending+ // (falling back to the previous period's count for values that only appear there).+ const firstStepCount = (key: string): number =>+ currentByValue.get(key)?.[0]?.count ?? previousByValue.get(key)?.[0]?.count ?? 0+ const orderedValues = Array.from(new Set(groups.map(valueKey))).sort(+ (a, b) => firstStepCount(b) - firstStepCount(a)+ )++ const representative = groups[0]++ return representative.map((baseStep, stepIndex) => {+ const nestedBreakdown: FunnelStep[] = []+ let currentTotal = 0++ orderedValues.forEach((key, breakdownOrder) => {+ const current = currentByValue.get(key)?.[stepIndex]+ const previous = previousByValue.get(key)?.[stepIndex]+ if (current) {+ nestedBreakdown.push({ ...current, order: breakdownOrder })+ currentTotal += current.count+ }+ if (previous) {+ nestedBreakdown.push({ ...previous, order: breakdownOrder })+ }+ })++ return {+ ...baseStep,+ count: currentTotal,+ breakdown: breakdownProperty,+ nested_breakdown: nestedBreakdown,+ average_conversion_time: calculateAverageConversionTime(+ nestedBreakdown.filter((variant) => variant.compare_label !== 'previous')+ ),+ median_conversion_time: null,+ people: [],+ }+ })+}+/** Breakdown parameter could be a string (property breakdown) or object/number (list of cohort ids). */export function hasBreakdownFilterParameter(breakdown: BreakdownKeyType | undefined,diff --git a/posthog/hogql_queries/insights/funnels/funnels_query_runner.py b/posthog/hogql_queries/insights/funnels/funnels_query_runner.pyindex 05e7b0b48df9..1f3abf19730f 100644--- a/posthog/hogql_queries/insights/funnels/funnels_query_runner.py+++ b/posthog/hogql_queries/insights/funnels/funnels_query_runner.py@@ -257,26 +257,31 @@ class FunnelsQueryRunner(AnalyticsQueryRunner[FunnelsQueryResponse]):current_results = current_response.results or []previous_results = previous_response.results or []- # STEPS returns an empty list for a period with no matching events. Backfill it with a- # zeroed step skeleton (cloned from the populated period) so the grouped-bar chart still- # draws a bar per step on both sides instead of collapsing to a single bar. TRENDS and- # TIME_TO_CONVERT always return a populated skeleton, so this only fires for STEPS.- # Breakdown STEPS (list-of-lists) is a later slice; the `isinstance(dict)` guard skips it.- if self.context.funnelsFilter.funnelVizType == FunnelVizType.STEPS:- populated = current_results or previous_results- is_flat_steps = bool(populated) and all(isinstance(row, dict) for row in populated)- if is_flat_steps and not previous_results:+ is_steps = self.context.funnelsFilter.funnelVizType == FunnelVizType.STEPS++ if is_steps and self._is_breakdown_groups(current_results or previous_results):+ # Breakdown STEPS return one inner funnel (a list of step dicts) per breakdown value.+ # Compare doubles this to 2·N inner funnels — N current + N previous — tagging each+ # step and aligning the periods by breakdown value (TRENDS keeps its flat dict rows).+ merged_results = self._merge_breakdown_compare_groups(current_results, previous_results)+ else:+ # Flat STEPS returns an empty list for a period with no matching events. Backfill it+ # with a zeroed step skeleton (cloned from the populated period) so the grouped-bar+ # chart still draws a bar per step on both sides instead of collapsing to a single bar.+ # TRENDS and TIME_TO_CONVERT always return a populated skeleton, so this only fires for+ # flat STEPS.+ if is_steps and current_results and not previous_results:previous_results = self._zeroed_steps_skeleton(current_results)- elif is_flat_steps and not current_results:+ elif is_steps and previous_results and not current_results:current_results = self._zeroed_steps_skeleton(previous_results)- merged_results = []- for row in current_results:- row["compare_label"] = "current"- merged_results.append(row)- for row in previous_results:- row["compare_label"] = "previous"- merged_results.append(row)+ merged_results = []+ for row in current_results:+ row["compare_label"] = "current"+ merged_results.append(row)+ for row in previous_results:+ row["compare_label"] = "previous"+ merged_results.append(row)timings = list(current_response.timings or []) + list(previous_response.timings or [])@@ -308,6 +313,43 @@ class FunnelsQueryRunner(AnalyticsQueryRunner[FunnelsQueryResponse]):for step in steps]+ @staticmethod+ def _is_breakdown_groups(results: list) -> bool:+ """Whether a results payload is breakdown STEPS — a list of inner funnels (one list of step+ dicts per breakdown value) rather than a flat list of step dicts."""+ return bool(results) and all(isinstance(row, list) for row in results)++ @staticmethod+ def _breakdown_key(group: list[dict[str, Any]]) -> tuple:+ """Hashable identity for an inner funnel — its breakdown_value (a list) as a tuple."""+ value = group[0].get("breakdown_value") if group else None+ return tuple(value) if isinstance(value, list) else (value,)++ def _merge_breakdown_compare_groups(+ self, current_groups: list[list[dict[str, Any]]], previous_groups: list[list[dict[str, Any]]]+ ) -> list[list[dict[str, Any]]]:+ """Tag each breakdown inner funnel with its period and return the combined 2·N list, aligned+ by breakdown value. A value present in only one period is still represented on the other+ side as a zeroed inner funnel (preserving its breakdown_value), so the chart can draw a+ current/previous pair for every value. Emits all current groups, then all previous groups."""+ current_by_value = {self._breakdown_key(group): group for group in current_groups}+ previous_by_value = {self._breakdown_key(group): group for group in previous_groups}++ # Current values first (the runner already ordered them by count), then previous-only values.+ ordered_keys = list(current_by_value.keys()) + [key for key in previous_by_value if key not in current_by_value]++ def tagged(group: list[dict[str, Any]], label: str) -> list[dict[str, Any]]:+ return [{**step, "compare_label": label} for step in group]++ merged: list[list[dict[str, Any]]] = []+ for key in ordered_keys:+ current_group = current_by_value.get(key) or self._zeroed_steps_skeleton(previous_by_value[key])+ merged.append(tagged(current_group, "current"))+ for key in ordered_keys:+ previous_group = previous_by_value.get(key) or self._zeroed_steps_skeleton(current_by_value[key])+ merged.append(tagged(previous_group, "previous"))+ return merged+def _calculate_compare_time_to_convert(self) -> FunnelsQueryResponse:"""Compare for the TIME_TO_CONVERT viz: both histograms must share an x-axis.diff --git a/posthog/hogql_queries/insights/funnels/test/test_funnel.py b/posthog/hogql_queries/insights/funnels/test/test_funnel.pyindex 9b8c9611b01a..5fe9e5fdeba8 100644--- a/posthog/hogql_queries/insights/funnels/test/test_funnel.py+++ b/posthog/hogql_queries/insights/funnels/test/test_funnel.py@@ -6122,3 +6122,110 @@ class TestFunnelStepsCompareUDF(ClickhouseTestMixin, APIBaseTest):self.assertEqual([s["order"] for s in previous_steps], [0, 1])self.assertEqual([s["count"] for s in previous_steps], [0, 0])self.assertEqual([s["name"] for s in previous_steps], ["step one", "step two"])+++@override_settings(IN_UNIT_TESTING=True)+class TestFunnelStepsBreakdownCompareUDF(ClickhouseTestMixin, APIBaseTest):+ """Compare-to-previous composed with a breakdown on the funnel STEPS viz. A breakdown funnel+ returns N inner funnels (a list-of-lists); with compare on it returns 2·N — N current and N+ previous — each inner funnel preserving its breakdown_value and each step tagged compare_label."""++ maxDiff = None++ def _build_query(+ self,+ breakdown: str = "$browser",+ date_from: str = "2021-06-07 00:00:00",+ date_to: str = "2021-06-13 23:59:59",+ compare: bool = True,+ compare_to: Optional[str] = None,+ ) -> FunnelsQuery:+ return FunnelsQuery(+ dateRange=DateRange(date_from=date_from, date_to=date_to),+ interval="day",+ series=[EventsNode(event="step one"), EventsNode(event="step two")],+ breakdownFilter=BreakdownFilter(breakdown=breakdown),+ funnelsFilter=FunnelsFilter(+ funnelVizType="steps",+ funnelWindowInterval=7,+ funnelWindowIntervalUnit="day",+ ),+ compareFilter=CompareFilter(compare=compare, compare_to=compare_to),+ )++ @staticmethod+ def _by_label_and_value(results) -> dict[tuple[str, tuple], list[dict]]:+ # results is a list of inner funnels (list-of-lists). Key each by (compare_label, breakdown_value).+ return {(group[0]["compare_label"], tuple(group[0]["breakdown_value"])): group for group in results}++ def _conversion(self, browser: str, day: int) -> list[dict]:+ return [+ {"event": "step one", "timestamp": datetime(2021, 6, day, 10), "properties": {"$browser": browser}},+ {"event": "step two", "timestamp": datetime(2021, 6, day, 11), "properties": {"$browser": browser}},+ ]++ @parameterized.expand(+ [+ (+ # Both values convert in both periods (current 2021-06-07..13, default previous+ # 2021-05-31..06-06) → 2 values × 2 periods = 4 inner funnels, all populated.+ "all_values_in_both_periods",+ {+ "current_chrome": ("Chrome", 8),+ "current_safari": ("Safari", 9),+ "previous_chrome": ("Chrome", 1),+ "previous_safari": ("Safari", 2),+ },+ {+ ("current", ("Chrome",)): [1, 1],+ ("current", ("Safari",)): [1, 1],+ ("previous", ("Chrome",)): [1, 1],+ ("previous", ("Safari",)): [1, 1],+ },+ ),+ (+ # Chrome converts in both periods, Safari only in current, Firefox only in previous.+ # Each one-sided value is still represented on the missing side as a zeroed inner+ # funnel (the union across periods), so the chart draws a pair for every value.+ "one_sided_values_zeroed_on_missing_period",+ {+ "current_chrome": ("Chrome", 8),+ "current_safari": ("Safari", 9),+ "previous_chrome": ("Chrome", 1),+ "previous_firefox": ("Firefox", 2),+ },+ {+ ("current", ("Chrome",)): [1, 1],+ ("current", ("Safari",)): [1, 1],+ ("current", ("Firefox",)): [0, 0],+ ("previous", ("Chrome",)): [1, 1],+ ("previous", ("Safari",)): [0, 0],+ ("previous", ("Firefox",)): [1, 1],+ },+ ),+ ]+ )+ @patch("posthoganalytics.feature_enabled", return_value=True)+ def test_breakdown_compare_aligns_inner_funnels_by_value(self, _name, journeys, expected_counts, _feature_enabled):+ journeys_for(+ {key: self._conversion(browser, day) for key, (browser, day) in journeys.items()},+ self.team,+ )++ results = FunnelsQueryRunner(query=self._build_query(), team=self.team).calculate().results++ # One inner funnel per (period, breakdown value), spanning the union of values across both+ # periods. Every inner funnel — populated or zeroed — carries the full step skeleton tagged+ # by period and value, so the chart draws a current/previous pair of bars for every value.+ self.assertEqual(len(results), len(expected_counts))+ for group in results:+ self.assertEqual([s["order"] for s in group], [0, 1])+ self.assertEqual([s["name"] for s in group], ["step one", "step two"])+ for step in group:+ self.assertIn(step["compare_label"], ("current", "previous"))+ self.assertIsNotNone(step["breakdown_value"])++ groups = self._by_label_and_value(results)+ self.assertEqual(set(groups.keys()), set(expected_counts.keys()))+ for key, counts in expected_counts.items():+ self.assertEqual([s["count"] for s in groups[key]], counts)diff --git a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsx b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsxindex 2fe3e70c3a2c..bd9f30d7a21d 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsx+++ b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsx@@ -7,6 +7,7 @@ import { insightLogic } from 'scenes/insights/insightLogic'import funnelTopToBottomFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json'import funnelTopToBottomBreakdownFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdown.json'+import funnelTopToBottomBreakdownCompareFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdownCompare.json'import funnelTopToBottomCompareFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomCompare.json'import { dataNodeLogic } from '~/queries/nodes/DataNode/dataNodeLogic'import type { DataNodeLogicProps } from '~/queries/nodes/DataNode/dataNodeLogic'@@ -77,6 +78,15 @@ export const FunnelTopToBottomCompare: Story = {},}+// Breakdown + compare: each step stacks a bar per (breakdown value, period), paired by value with+// the previous-period bar desaturated under its current-period sibling.+export const FunnelTopToBottomBreakdownCompare: Story = {+ render: () => <StoryRender insightFixture={funnelTopToBottomBreakdownCompareFixture} width={720} />,+ parameters: {+ featureFlags: [FEATURE_FLAGS.PRODUCT_ANALYTICS_FUNNELS_COMPARE],+ },+}+// Narrow widths force the step footers to wrap — each row should grow to fit its own text// without overlapping the next step.export const DefaultNarrow: Story = {diff --git a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.test.ts b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.test.tsindex eba7de23cd2e..f31b07199cef 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.test.ts+++ b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.test.ts@@ -383,6 +383,57 @@ describe('buildFunnelBarHorizontalData', () => {expect(step.bars[1].series[0].meta).toEqual({ isDropOff: false, breakdownIndex: 1 })expect(step.bars[1].series[1].meta).toEqual({ isDropOff: true, breakdownIndex: 1 })})++ describe('with breakdown', () => {+ // Breakdown + compare: nested_breakdown is paired [value0 current, value0 previous, …], so each+ // (value, period) gets its own full-track bar — no overflow from stacking variants scaled to the+ // grouped-bar baseline — and bars read paired by breakdown value with the previous one dimmed.+ const breakdownCompareSteps: FunnelStepWithConversionMetrics[] = [+ makeStep({+ count: 140,+ fromBasisStep: 1,+ compare_label: 'current',+ nested_breakdown: [+ makeStep({ count: 100, fromBasisStep: 1, breakdown_value: 'mobile', compare_label: 'current' }),+ makeStep({+ count: 80,+ fromBasisStep: 0.8,+ breakdown_value: 'mobile',+ compare_label: 'previous',+ }),+ makeStep({+ count: 40,+ fromBasisStep: 0.4,+ breakdown_value: 'desktop',+ compare_label: 'current',+ }),+ makeStep({+ count: 25,+ fromBasisStep: 0.25,+ breakdown_value: 'desktop',+ compare_label: 'previous',+ }),+ ],+ }),+ ]++ it('renders one full-track bar per (breakdown value, period)', () => {+ const [step] = buildFunnelBarHorizontalCompareData(breakdownCompareSteps, options)++ expect(step.bars).toHaveLength(4)+ expect(step.bars.map((bar) => bar.series[0].data[0])).toEqual([100, 80, 40, 25])+ expect(step.bars.map((bar) => bar.series[0].meta?.breakdownIndex)).toEqual([0, 1, 2, 3])+ })++ it('dims each breakdown value’s previous-period bar', () => {+ const getColor = jest.fn((v: FunnelStepWithConversionMetrics) =>+ v.compare_label === 'previous' ? '#dimmed' : '#solid'+ )+ const [step] = buildFunnelBarHorizontalCompareData(breakdownCompareSteps, { ...options, getColor })++ expect(step.bars.map((bar) => bar.series[0].color)).toEqual(['#solid', '#dimmed', '#solid', '#dimmed'])+ })+ })})describe('series keys', () => {diff --git a/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.stories.tsx b/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.stories.tsxindex 428420517e28..9e978f7e7558 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.stories.tsx+++ b/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.stories.tsx@@ -6,6 +6,8 @@ import { insightLogic } from 'scenes/insights/insightLogic'import funnelTopToBottomFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json'import funnelTopToBottomBreakdownFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdown.json'+import funnelTopToBottomBreakdownCompareFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdownCompare.json'+import funnelTopToBottomCompareFixture from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomCompare.json'import { dataNodeLogic } from '~/queries/nodes/DataNode/dataNodeLogic'import type { DataNodeLogicProps } from '~/queries/nodes/DataNode/dataNodeLogic'import { insightVizDataNodeKey } from '~/queries/nodes/InsightViz/InsightViz'@@ -67,3 +69,11 @@ export const Default: Story = {export const Breakdown: Story = {render: () => <StoryRender insightFixture={funnelTopToBottomBreakdownFixture} />,}++export const Compare: Story = {+ render: () => <StoryRender insightFixture={funnelTopToBottomCompareFixture} />,+}++export const BreakdownAndCompare: Story = {+ render: () => <StoryRender insightFixture={funnelTopToBottomBreakdownCompareFixture} />,+}diff --git a/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.tsx b/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.tsxindex 0e2e0a087ab0..47eea2ca5d71 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.tsx+++ b/products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart.tsx@@ -10,6 +10,7 @@ import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShimport { StepLegend } from 'scenes/funnels/FunnelBarVertical/StepLegend'import { funnelDataLogic } from 'scenes/funnels/funnelDataLogic'import { funnelPersonsModalLogic } from 'scenes/funnels/funnelPersonsModalLogic'+import { hasBreakdown } from 'scenes/funnels/funnelUtils'import { insightLogic } from 'scenes/insights/insightLogic'import { themeLogic } from '~/layout/navigation-3000/themeLogic'@@ -64,11 +65,28 @@ export function FunnelStepsBarChart({() =>buildFunnelStepsBarData(steps, {getColor: getFunnelsColor,- getLabel: (variant) => String(variant.breakdown_value ?? variant.name ?? ''),+ // Breakdown + compare bars share a breakdown value across periods, so the legend+ // must also name the period; plain breakdown/compare bars keep their single label.+ getLabel: (variant) =>+ variant.compare_label && hasBreakdown(variant.breakdown_value)+ ? `${String(variant.breakdown_value)} · ${+ variant.compare_label === 'current' ? 'Current' : 'Previous'+ }`+ : String(variant.breakdown_value ?? variant.name ?? ''),}),[steps, getFunnelsColor])+ // Only breakdown + compare needs a legend mapping color → breakdown value (and period); plain+ // breakdown reads off the results table and pure compare is self-evident, so neither regresses.+ const isBreakdownCompare = steps[0]?.nested_breakdown?.some(+ (variant) => variant.compare_label != null && hasBreakdown(variant.breakdown_value)+ )+ const config = useMemo(+ () => (isBreakdownCompare ? { ...chartConfig, legend: { show: true, interactive: false } } : chartConfig),+ [isBreakdownCompare]+ )+const groupTypeLabel = aggregationLabel(querySource?.aggregation_group_type_index).pluralconst showTime = steps.some((step) => step.average_conversion_time != null)@@ -118,7 +136,7 @@ export function FunnelStepsBarChart({series={series}labels={labels}theme={theme}- config={chartConfig}+ config={config}tooltip={renderTooltip}onPointClick={showPersonsModal ? onPointClick : undefined}onError={handleChartError}