PostHog / PostHog/posthog

Partial paths returned from User Paths

Open
#20,554 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature/insights feature/paths
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

Description

Bug description

  • When a "Maximum number of paths" is set, this just adds a LIMIT n clause to the underlying SQL query. The query returns a list of A => B steps - which means a path with 3 steps (e.g. A => B => C) requires 2 rows of data (A => B and B => C).
  • Because of this, we can lose the latter steps of some paths with the LIMIT clause
  • Most of the time, this is unnoticeable, but when you also have "Ends at" turned on, you get some odd results with paths ending at the wrong URL

How to reproduce

Thank you for your bug report – we love squashing them!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the User Paths implementation and find the underlying SQL query where the maximum number of paths becomes a LIMIT clause. Reproduce the behavior using the linked support ticket, especially with “Ends at” enabled. Done means limited results retain complete paths and do not end at the wrong URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
analytics, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.