Skip to main content

Overriding URLs

Palette collects the pathname of each user session. This allows attributing metrics to specific pages.

It's often helpful to group together pages that share the same paramaterized URL.

For example, if you have an app that shows user profiles, such as/user/john-doe and /user/jane-doe, it's helpful to group these paths under the url /user/[name].

To do this, you can use the tag function to override the URL.

import { tag } from "@palette.dev/browser";

tag("palette.location", "/user/[name]");