Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix(api): use strict_increase instead of strict_order for windowFunnel

Carl-Gerhard Lindesvärd8082d4907e36
diff --git a/packages/trpc/src/routers/chart.helpers.ts b/packages/trpc/src/routers/chart.helpers.ts
index 2e82f329c..5477f3dd8 100644
--- a/packages/trpc/src/routers/chart.helpers.ts
+++ b/packages/trpc/src/routers/chart.helpers.ts
@@ -315,7 +315,7 @@ export async function getFunnelData({
const innerSql = `SELECT
session_id,
- windowFunnel(${ONE_DAY_IN_SECONDS}, 'strict_order')(toUnixTimestamp(created_at), ${funnels.join(', ')}) AS level
+ windowFunnel(${ONE_DAY_IN_SECONDS}, 'strict_increase')(toUnixTimestamp(created_at), ${funnels.join(', ')}) AS level
FROM ${TABLE_NAMES.events}
WHERE
project_id = ${escape(projectId)} AND