PostHog Path Cleaning Rules

•
63
•

Inspects URL paths and drafts, tests, orders, and applies regex-based path cleaning rules in PostHog to collapse dynamic segments into clean aliases.

Managing Path Cleaning Rules simplifies URL normalization across PostHog Web Analytics and Paths insights by collapsing high-cardinality dynamic segments (such as user IDs, UUIDs, dates, and slugs) into structured, human-readable aliases. This skill inspects real production traffic via HogQL, crafts optimized RE2 regular expressions, tests rule interactions, properly orders specific-to-generic execution chains, and safely applies changes using project-level MCP tools.

Key Features

0163 GitHub stars
02Safely updates project-level path cleaning filters using MCP preview workflows
03Enforces specific-to-generic rule ordering to prevent accidental pattern masking
04Analyzes real pageview events with HogQL to identify high-cardinality path patterns
05Generates optimized RE2 regex rules with human-readable placeholder aliases
06Tests pattern transformations against sample paths before saving

Use Cases

01Consolidating fragmented web analytics charts caused by dynamic user IDs or UUIDs
02Standardizing URL reporting across team workspaces and HogQL queries
03Cleaning Paths insights to analyze aggregated user navigation flows