From ec5cc0951cce71675de44a85a108f37be1afca3d Mon Sep 17 00:00:00 2001 From: Rafa Audibert Date: Wed, 4 Dec 2024 22:13:10 -0300 Subject: [PATCH] Return conversion for `PAGE` queries Simply use the main query, scroll bounce/bounce doesn't make sense --- posthog/hogql_queries/web_analytics/stats_table.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/posthog/hogql_queries/web_analytics/stats_table.py b/posthog/hogql_queries/web_analytics/stats_table.py index b5f6ca3e599a5..3913242c13dd6 100644 --- a/posthog/hogql_queries/web_analytics/stats_table.py +++ b/posthog/hogql_queries/web_analytics/stats_table.py @@ -48,7 +48,9 @@ def __init__(self, *args, **kwargs): def to_query(self) -> ast.SelectQuery: if self.query.breakdownBy == WebStatsBreakdown.PAGE: - if self.query.includeScrollDepth and self.query.includeBounceRate: + if self.query.conversionGoal: + return self.to_main_query(self._counts_breakdown_value()) + elif self.query.includeScrollDepth and self.query.includeBounceRate: return self.to_path_scroll_bounce_query() elif self.query.includeBounceRate: return self.to_path_bounce_query()