Skip to content

Add event funnels - #1045

Merged
tudddorrr merged 1 commit into
developfrom
event-funnels
Sep 4, 2026
Merged

Add event funnels#1045
tudddorrr merged 1 commit into
developfrom
event-funnels

Conversation

@tudddorrr

Copy link
Copy Markdown
Collaborator

Event funnel model

  • Add an EventFunnel entity storing a name, an ordered list of steps, and a max gap between steps, with a database migration and registration in the entities index.
  • Add full CRUD endpoints under /games/:gameId/event-funnels (create, list, get, update, delete) scoped to the game, plus schema validation covering step names, rule operators, and max gap.

ClickHouse funnel computation

  • Compute funnel conversion in ClickHouse by joining each step on the previous one for the same player, within the configured max gap and date window.
  • Each step reports distinct player count, percentage relative to the first step, and average seconds to reach the next step.
  • Support step property rules with operators (set, =, !=, comparison, between, contains) combined in and/or mode, and exclude dev build events unless dev data is requested.
  • Add a preview endpoint to evaluate a funnel definition without persisting it.

Caching

  • Cache computed funnel results per game, funnel, date window, and dev-data flag with a 15-minute TTL.
  • Bust the cache on funnel update and via an explicit refresh endpoint so results stay current.

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.42%. Comparing base (953531f) to head (88505bd).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1045      +/-   ##
===========================================
+ Coverage    98.37%   98.42%   +0.04%     
===========================================
  Files          467      477      +10     
  Lines         7462     7614     +152     
  Branches       984      999      +15     
===========================================
+ Hits          7341     7494     +153     
  Misses          49       49              
+ Partials        72       71       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tudddorrr tudddorrr changed the title Add event funnels feature with ClickHouse computation Add event funnels Sep 4, 2026
@tudddorrr
tudddorrr merged commit 70f09ae into develop Sep 4, 2026
9 checks passed
@tudddorrr
tudddorrr deleted the event-funnels branch September 4, 2026 20:02
@tudddorrr tudddorrr added the enhancement New feature or request label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant