managing-path-cleaning-rules
Installation
SKILL.md
Managing path cleaning rules
Path cleaning rules normalize $pathname and $entry_pathname so that pages
sharing the same template (/users/123/profile, /users/456/profile, …) collapse
into one row (/users/<id>/profile) in Web analytics tiles, Paths insights, and
any HogQL query that calls apply_path_cleaning. They are the right answer when
a breakdown is fragmented across thousands of near-identical URLs.
This skill teaches you how to:
- recognize when path cleaning is the right tool
- inspect real paths to find what needs cleaning
- write
regex+aliasrules in re2 syntax with the project's placeholder convention - test rules before saving them
- order rules so specific patterns aren't swallowed by generic ones
- apply the rules via MCP