From e7444f3c77301db635beb70e79a2e508ace21902 Mon Sep 17 00:00:00 2001 From: guitavano Date: Wed, 8 Jul 2026 00:12:43 -0300 Subject: [PATCH] Show visitors row in A/B funnel tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Funnel and By-Goal tables filtered out the "visitors" baseline, so it never showed even when selected — unlike the admin screen. Include every goal (visitors included) in the tables, matching the admin. The goal bar chart still excludes visitors, whose conversion is always 100% and would flatten the other goals. Co-Authored-By: Claude Opus 4.8 --- web/tools/experiments/index.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/web/tools/experiments/index.tsx b/web/tools/experiments/index.tsx index f8cac17..b61dde3 100644 --- a/web/tools/experiments/index.tsx +++ b/web/tools/experiments/index.tsx @@ -385,9 +385,11 @@ function ResultsView({ callTool, ]); + // Tables (Funnel / By Goal) show every goal including the visitors baseline, + // matching the admin. The bar chart drops visitors (its conversion would + // always be 100% and would flatten the other goals). const sortedGoals = useMemo( - () => - data ? sortByTotal(data.goals.filter((g) => g.goal !== "visitors")) : [], + () => (data ? sortByTotal(data.goals) : []), [data], ); @@ -415,11 +417,13 @@ function ResultsView({ "Test Variant 1": point.variant, })) ?? []; - const barData = sortedGoals.map((g) => ({ - goal: g.goal, - Default: percentage(g.default, visitors.default), - "Test Variant 1": percentage(g.variant, visitors.variant), - })); + const barData = sortedGoals + .filter((g) => g.goal !== "visitors") + .map((g) => ({ + goal: g.goal, + Default: percentage(g.default, visitors.default), + "Test Variant 1": percentage(g.variant, visitors.variant), + })); return (