-
Notifications
You must be signed in to change notification settings - Fork 3
Tracked links with click analytics #23
Copy link
Copy link
Open
Labels
area: analyticsMetrics, charts, reportingMetrics, charts, reportingarea: automationTriggers, keywords, DM content, delivery behaviourTriggers, keywords, DM content, delivery behavioureffort: largeA design decision first, then a buildA design decision first, then a buildenhancementNew feature or requestNew feature or requestroadmapA planned feature from the README roadmapA planned feature from the README roadmap
Description
Metadata
Metadata
Assignees
Labels
area: analyticsMetrics, charts, reportingMetrics, charts, reportingarea: automationTriggers, keywords, DM content, delivery behaviourTriggers, keywords, DM content, delivery behavioureffort: largeA design decision first, then a buildA design decision first, then a buildenhancementNew feature or requestNew feature or requestroadmapA planned feature from the README roadmapA planned feature from the README roadmap
The problem
You can see that a DM sent. You cannot see whether anyone opened the link, so there is no way to tell a keyword that converts from one that merely fires.
What to build
Short tracked links, generated per rule, that redirect and count.
Schema
Route:
GET /r/:slug→ 302 to the destination, click recorded viawaitUntilso the redirect is never delayed.Privacy: hash the IP with a salt from an existing secret. Never store a raw IP. Say so in
/privacy, which is a page this repository already serves and which Meta reads during review.Things worth getting right
/r/:slugmust be excluded from the admin auth middleware — it is public by definition.Acceptance criteria
slugandclicked_at/r/:slugredirects in one hop and records asynchronously/privacyupdated to describe click logging and IP hashingWhere to look
src/index.ts(route registration),src/routes/,src/db.ts,migrations/,src/routes/legal.ts