Problem
Currently links are direct <a href> tags. Click tracking happens client-side via /api/track — if a visitor has JS disabled, clicks aren't counted.
Proposed solution
Add a /go/:linkId server-side redirect endpoint:
- Receives click request
- Records the click server-side (no client JS needed)
- 302-redirects to the target URL
Make this configurable in settings:
- Direct mode (current): links point to real URLs, tracked client-side
- Redirect mode (new): links point to
/go/:id, tracked server-side
Benefits
- Analytics work without client JS
- Destination URLs masked from page source
- More accurate click counting
Acceptance criteria
Problem
Currently links are direct
<a href>tags. Click tracking happens client-side via/api/track— if a visitor has JS disabled, clicks aren't counted.Proposed solution
Add a
/go/:linkIdserver-side redirect endpoint:Make this configurable in settings:
/go/:id, tracked server-sideBenefits
Acceptance criteria
/go/:linkIdendpoint records click + redirects