Links/redirects: /go/ short links with click counts, Plausible and UTM tags (migration 068)
Data > Links/redirects (editors and up) makes short links on our domain. GET /go/<id> counts the click, reports it to Plausible as a pageview of /go/<id> (the visitor's browser and address, no key needed), and redirects (302, no-store) with the link's UTM tags added to the destination. Unknown ids fall through to the not-found page. The editor can show a fixed lead-in in the URL ID box (idPrefix). Vite proxies /go in dev. docs/redirects.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3fafd7f92c
commit
6289e7203f
13 changed files with 284 additions and 4 deletions
|
|
@ -22,6 +22,13 @@ export default defineConfig({
|
|||
changeOrigin: false,
|
||||
xfwd: true,
|
||||
},
|
||||
// Short links (server/src/routes/redirects.js): in production
|
||||
// nginx's page block sends them to the API.
|
||||
"/go": {
|
||||
target: "http://127.0.0.1:3001",
|
||||
changeOrigin: false,
|
||||
xfwd: true,
|
||||
},
|
||||
// Uploaded images. nginx serves these in production; in dev
|
||||
// the API does, so they go to the same place as /api.
|
||||
"/uploads": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue