Closed robbie-c closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
posthog-js | ✅ Ready (Inspect) | Visit Preview | Sep 20, 2024 10:00am |
Size Change: +303 B (+0.02%)
Total Size: 1.21 MB
Filename | Size | Change |
---|---|---|
dist/array.full.js |
347 kB | +75 B (+0.02%) |
dist/array.js |
163 kB | +76 B (+0.05%) |
dist/main.js |
164 kB | +76 B (+0.05%) |
dist/module.js |
163 kB | +76 B (+0.05%) |
Asked a question about this in the private slack posthog.slack.com/archives/C03C60FT1J7/p1726670676997629
Closing PR following discussion on slack
Changes
We handle the
$referrer
property in a potentially confusing way when an internal link is clicked. The latest example is https://posthog.slack.com/archives/C03C60FT1J7/p1726670676997629.This happens because we use
document.referrer
directly, and this can be self-referential in the following examplehttps://referrer.com
https://tracked.com
referrer.com
https://tracked.com
tracked.com
This PR changes this, so that the referrer in 6) would be
$direct
To be clear about this: it is a breaking change, however I believe it's more in line with what the expected behaviour would be. One might argue that the original behaviour is a bug
Checklist