paths

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package paths computes user flows — "what do users do after event X?" — the Flows / Pathfinder / Paths report. For each user it anchors at their first occurrence of the start event and follows the next steps in time order, then aggregates the ranked next-event at each depth. Deterministic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level struct {
	Depth int    `json:"depth"`
	Steps []Step `json:"steps"`
}

Level is the ranked distribution of the Nth event after the start.

type Result

type Result struct {
	Start  string  `json:"start"`
	Users  int     `json:"users"`
	Levels []Level `json:"levels"`
}

Result is the flow: how many users hit the start, then what they did next.

func After

func After(events []event.Event, start string, depth int) Result

After follows up to `depth` steps after each user's first `start` event and ranks what they did at each step (a user who stops contributes an implicit drop).

type Step

type Step struct {
	Event string `json:"event"`
	Count int    `json:"count"`
}

Step is one event and how many users took it at a given depth.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL