Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(funnels): show median time to convert in top-to-bottom view (#68561)

Thomas Obermüller79be0ac7faae
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index e6ae60b15a72..e84b80507fe2 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -2509,29 +2509,29 @@ snapshots:
home-recordingrow--default--light:
hash: v1.k794b7964.e0ff416dd027d854840ac7ca7179f9e9fb645b9be76f2bbe868d3a579061bcbc.BBl_q_cAbB59SPqUq-2nJePocIaexbKxJprrA9SVoTw
insights-funnelbarhorizontalchart--breakdown--dark:
- hash: v1.k794b7964.983865e1fff2cd64d1b6234dd784c96d39b3fbb98c392d31721799e9409515ea.G9zd5nsa-tBjkGcO0e4qF3RmvlC6ay6wzm69DfuPdQg
+ hash: v1.k794b7964.e1339725b2bf6fd5c152865170f77320dbc22dc941a23fdc81694f3a4b17f884.poYcV8iWzKuJI0od7oM9G9gjUXrgP38w7bGlQushUjg
insights-funnelbarhorizontalchart--breakdown--light:
- hash: v1.k794b7964.4011e4e135c55102914b3d1316b56cabca20d77b0cf40e2806b5ba21c5ed76dd.vRFSMbrLXPfmhjwX-hioKM-dMfWgMOmt0i-84hhbkpY
+ hash: v1.k794b7964.a11b1619b8c29926619786806762f0f6f730587a2b7eb3a7aa11d9b710a67d6d.2yh4VlC2G8e22ztp4DG36WWVtZ5AYW03e-CUsNWhUV0
insights-funnelbarhorizontalchart--breakdown-narrow--dark:
- hash: v1.k794b7964.04e6591834721d31c5094930d39daf4a8fbf037355cf0a737ee9561297bc88e9.QJEEtzaB-dAwshkmJPCR6UrKq5TCZ4KKkQW1fuHuaKU
+ hash: v1.k794b7964.dc1adb4e1ebd56871bd3bd0ec2b05c4dd96f47b48e279f0b2dfec3bff8619732.C4MQ0yiWhCe_9udOmGeQ2CcDWHciEXyXaG9kM_prT0E
insights-funnelbarhorizontalchart--breakdown-narrow--light:
- hash: v1.k794b7964.06bad46919772bc0d253edf0514c7bbc0500b2508746db91ecb1c850c9e7aa43.tX26L6xQv1i0IUoTBhHjACwfsQcz4jzRm-mv0mBFNXQ
+ hash: v1.k794b7964.2b9f03c8989cdaf7ae1f3e3d02bd1fa6f397fb5c661606dbd1c37ac08295fe54.or8-CpruZkNNbylxWbqBJCkfV7CJqORRm_y2BaE6q_c
insights-funnelbarhorizontalchart--default--dark:
- hash: v1.k794b7964.8232fbf5803ce2068e443f39e2ea51dec7b2303dcdfb810361931c0de3ba35a6.KMSyRW0_UnqnHYa7WOcBrnPnjK09oa85a9ChruB7lWI
+ hash: v1.k794b7964.f011a655d8dc1eafb11a9830e8783c08c3a14c4c8ca3ccf08a36f686edaea71c.tdW3aO9QQYirn_75pNWDlKSmyvRoyOkaVQya7VRejUA
insights-funnelbarhorizontalchart--default--light:
- hash: v1.k794b7964.e2a2dfd74c92f8cca870c01752ef858f04f9a6262487ae3121cd85fb4668b4cd.pPtj-XUq0phM9FM0WM4XJK9ezf6mEGSeZZ5_Us7q_aI
+ hash: v1.k794b7964.12179cfcb1aa09aca736c81fea823577963aac1c12c3a2abe01c6cfcf31cac2b.SikkivwGywIQHXjEWBc69l5SMigCMtYx-DmMWMJ0b9g
insights-funnelbarhorizontalchart--default-narrow--dark:
- hash: v1.k794b7964.eda9d9285d389cf7f6b2f24da81b0068f89afdf82aa10e9f01cae3b88951e772.IG9L_KV3jAimpHalXw5lhQZBq5QhNo0fUOsEhg0U12A
+ hash: v1.k794b7964.00ffd091da542465f6b15fb03ad6bc2aa3118855c0f29612b9ebe9f93ee2d428.p0EYCXIBkMJ0Ed8aFkDkd-IRVCoJKzUPMPkrMNTAHJo
insights-funnelbarhorizontalchart--default-narrow--light:
- hash: v1.k794b7964.a349dd791a40254a87e5e41e3bd38c425f401dc16c1b68f493302e3869338126.NhwZiL-08bOUeVy6P6JbrIypIG1Yu0HWSeMtB3ljV_I
+ hash: v1.k794b7964.411414b67c94440e78743cb397c54cb0a711d6e981be07494b5c3dddf1a1fcfc.fameixXKf0O-EPcyinFdSbJlxKYii0weCHidyeTRmRQ
insights-funnelbarhorizontalchart--funnel-top-to-bottom-breakdown-compare--dark:
- hash: v1.k794b7964.182b50e2d4db20688f53d06f38279667a0934ed21e1172c34e4ff2e531c781dc.h82CZPsRr5s01gYBbn5z4dg_hsbRfONrvPx1GOBouhA
+ hash: v1.k794b7964.d1c0b85d86cd00f040ae57e5cf2e5e03477683eacf6bf186740fde490d45a3ed.gRi0rdeBdPAU_QZpp4KMTpopM6nAJarN6N0fBgSezv0
insights-funnelbarhorizontalchart--funnel-top-to-bottom-breakdown-compare--light:
- hash: v1.k794b7964.39b92aeab8339a663753a753d10b4d2a2954f85a8c0079c7ee8ca2958f454599.Ck36wU3flR8WrLzIMhjIVHDiKu-OWWw5jpfqmbykX6g
+ hash: v1.k794b7964.69d24116a127fce32e031acc3053b696adf6434551435ab9580406d3fa6d5cd5.xBMAqnyCfkb6pT0YZp1xG0h-mx1Dk593HGmCzh8Nu_w
insights-funnelbarhorizontalchart--funnel-top-to-bottom-compare--dark:
- hash: v1.k794b7964.badfae3af473522966632aa0fc1d16167a64b957f7910dbcf07b15ffb0e52c0e.a09moTKc1CQNJc9HhB6q02KZFKdYGKhwK6hxb57sxYo
+ hash: v1.k794b7964.c0cb3c277a6081f617f8ea8669b80691aae8284a398eeaf75be2f855537f6a7c.YWqcUF2RMT4ILrETfQAfyuyrLbF7EACFRBAi4HTeAZQ
insights-funnelbarhorizontalchart--funnel-top-to-bottom-compare--light:
- hash: v1.k794b7964.72e4ed37fbe61498e515f7cdee3c43cf1d1b10ef43f84c7d73ec8301c4e7f8b1.Q2XgKEhfTvaJZiCE8dQtc2W1TWf3b1codvJJfo6B-x4
+ hash: v1.k794b7964.42740d8b45dfc8f7cb167e71d930c1cc42b10c44ba97402a6b160f29698c6792.7x2CWt4-sb-tW06e0FLN_r97SDmvhyyHoOxMpCuElg8
insights-funnelcorrelationtable--default--dark:
hash: v1.k794b7964.0af5256b33397ecdb46b1ac61212b729dfed0d19852b4ed18e0eda9a0b0050ed.OQxSp3ebKc2qKtkfvM3ISvz8-U4EJiCVB1XoN1qCAK8
insights-funnelcorrelationtable--default--light:
diff --git a/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json b/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json
index 0d060f870b8e..d9b56b10f217 100644
--- a/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json
+++ b/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json
@@ -36,7 +36,7 @@
"count": 11337,
"type": "events",
"average_conversion_time": 566.4665946460116,
- "median_conversion_time": 0,
+ "median_conversion_time": 342.5,
"converted_people_url": "/api/person/funnel/?date_from=2022-03-04T00%3A00%3A00%2B00%3A00&date_to=2022-03-11T01%3A26%3A49.410346%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=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/?date_from=2022-03-04T00%3A00%3A00%2B00%3A00&date_to=2022-03-11T01%3A26%3A49.410346%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=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100"
},
@@ -49,7 +49,7 @@
"count": 1000,
"type": "events",
"average_conversion_time": 478.1569003315154,
- "median_conversion_time": 0,
+ "median_conversion_time": 289.0,
"converted_people_url": "/api/person/funnel/?date_from=2022-03-04T00%3A00%3A00%2B00%3A00&date_to=2022-03-11T01%3A26%3A49.410346%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=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/?date_from=2022-03-04T00%3A00%3A00%2B00%3A00&date_to=2022-03-11T01%3A26%3A49.410346%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=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&layout=horizontal&limit=100"
}
diff --git a/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomCompare.json b/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomCompare.json
index 34a5e9c361c3..151e4620dec8 100644
--- a/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomCompare.json
+++ b/frontend/src/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomCompare.json
@@ -41,7 +41,7 @@
"count": 8438,
"type": "events",
"average_conversion_time": 370.48673834484913,
- "median_conversion_time": 0,
+ "median_conversion_time": 224.0,
"converted_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"dropped_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"compare_label": "current"
@@ -55,7 +55,7 @@
"count": 2864,
"type": "events",
"average_conversion_time": 398.36358625967165,
- "median_conversion_time": 0,
+ "median_conversion_time": 241.0,
"converted_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"dropped_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"compare_label": "current"
@@ -83,7 +83,7 @@
"count": 6200,
"type": "events",
"average_conversion_time": 426.05974909657647,
- "median_conversion_time": 0,
+ "median_conversion_time": 259.0,
"converted_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"dropped_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=-2&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"compare_label": "previous"
@@ -97,7 +97,7 @@
"count": 1900,
"type": "events",
"average_conversion_time": 458.11812419862235,
- "median_conversion_time": 0,
+ "median_conversion_time": 276.0,
"converted_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"dropped_people_url": "/api/person/funnel/?date_from=2022-03-08T00%3A00%3A00%2B00%3A00&date_to=2022-03-15T21%3A42%3A48.469119%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=-3&funnel_viz_type=steps&funnel_window_interval=14&funnel_window_interval_unit=day&insight=FUNNELS&interval=day&limit=100",
"compare_label": "previous"
diff --git a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/StepHeader.tsx b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/StepHeader.tsx
index 3bb0078dccdc..8e8f77cf7c80 100644
--- a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/StepHeader.tsx
+++ b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/StepHeader.tsx
@@ -18,7 +18,7 @@ interface StepHeaderProps {
}
export function StepHeader({ step, stepIndex, previousStep, isUnordered, isOptional }: StepHeaderProps): JSX.Element {
- const showAverageTime = step.average_conversion_time != null && step.average_conversion_time >= Number.EPSILON
+ const showMedianTime = step.median_conversion_time != null && step.median_conversion_time >= Number.EPSILON
return (
<div className={clsx('flex flex-wrap items-center justify-between leading-5', isOptional && 'opacity-60')}>
@@ -36,9 +36,9 @@ export function StepHeader({ step, stepIndex, previousStep, isUnordered, isOptio
)}
<FunnelStepMore stepIndex={stepIndex} className="ml-1" />
</div>
- {showAverageTime ? (
- <div className="text-secondary text-xs" title="Average time of conversion from previous step">
- Avg time: <b>{humanFriendlyDuration(step.average_conversion_time, { maxUnits: 2 })}</b>
+ {showMedianTime ? (
+ <div className="text-secondary text-xs" title="Median time of conversion from previous step">
+ Median time: <b>{humanFriendlyDuration(step.median_conversion_time, { maxUnits: 2 })}</b>
</div>
) : null}
</div>