How to Track Referral Sources Without Storing Raw URLs or UTM Strings
A developer working on RetroPrompt, a web tool for generating portraits, has shared a privacy-conscious approach to referral attribution that avoids storing raw referrer URLs or arbitrary UTM parameters. The method classifies incoming traffic into fixed source categories — such as known search engines, publishing platforms, or an 'other_referral' bucket — by parsing hostnames against an explicit allowlist rather than using substring matching. To preserve attribution across a user session without tracking individuals, the implementation ties entry labels to a short-lived, random tab-session identifier that expires after 30 minutes of inactivity. The author notes that this approach has clear limits: two open tabs can generate separate sessions, and the metric is not equivalent to unique visitors or long-term retention figures reported by other analytics tools. The article emphasizes that attribution labels serve as bookkeeping aids, not proof of causation, and that missing or unrecognized attribution should remain visible rather than be silently discarded.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in