Skip to content

feat: add UTM params to external links#168

Merged
overtrue merged 1 commit into
mainfrom
overtrue/utm-external-links-552173
Jul 16, 2026
Merged

feat: add UTM params to external links#168
overtrue merged 1 commit into
mainfrom
overtrue/utm-external-links-552173

Conversation

@overtrue

Copy link
Copy Markdown
Collaborator

Add withUtm() helper that appends utm_source/utm_medium and a per-placement utm_content to external http(s) links. Existing query params are preserved verbatim and URLs already carrying utm_* params are left untouched so theme authors keep control.

Applied to all external link render sites: sidebar nav, top-nav GitHub/X buttons, login form help link, login hero website link, config page docs link, and license page support link.

Pull Request

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed
pnpm test:run

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Closes #

Screenshots (if applicable)

Additional Notes

Add withUtm() helper that appends utm_source/utm_medium and a
per-placement utm_content to external http(s) links. Existing query
params are preserved verbatim and URLs already carrying utm_* params
are left untouched so theme authors keep control.

Applied to all external link render sites: sidebar nav, top-nav
GitHub/X buttons, login form help link, login hero website link,
config page docs link, and license page support link.
Copilot AI review requested due to automatic review settings July 15, 2026 06:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@overtrue
overtrue merged commit 6a8d96e into main Jul 16, 2026
10 checks passed
@overtrue
overtrue deleted the overtrue/utm-external-links-552173 branch July 16, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants