Skip to content

URL normalization: strip tracking params (utm_*, fbclid, etc.) as configurable setting #6

@paperhurts

Description

@paperhurts

Where

packages/core/src/url.ts (normalizeUrl).

What

Spec §"Open questions" calls this out:

Bookmark URL normalization edge cases. Query string handling: ?utm_source=... parameters. Strip tracking params on save? Configurable list? Default off, add a "clean URL" toggle in settings.

Currently normalizeUrl only strips trailing slashes and non-hashbang fragments. Tracking params propagate.

Proposed shape

  1. Add stripTrackingParams: boolean to settings (default false, opt-in).
  2. When enabled, normalize strips: utm_*, fbclid, gclid, msclkid, ref, ref_src, plus a small editable allowlist.
  3. The list lives in @gitmarks/core so all clients (extension, web UI) share it.

Caveats

Make the list configurable per-user — some sites use utm_* legitimately for non-tracking purposes (rare but real). Probably an advanced settings panel in the web UI, not the extension.

Tracked from

spec.md §"Open questions".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions