fix(browser): re-read document.referrer when buffered value is empty#1354
fix(browser): re-read document.referrer when buffered value is empty#1354
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1354 +/- ##
==========================================
+ Coverage 91.32% 91.33% +0.01%
==========================================
Files 163 163
Lines 4393 4399 +6
Branches 1052 1056 +4
==========================================
+ Hits 4012 4018 +6
Misses 381 381
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
On iOS Safari, document.referrer is not yet populated when the snippet captures BufferedPageContext. This causes context.page.referrer to be empty in all Segment calls for the session. Re-read document.referrer in popPageContext() when the buffered value is empty. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1d93839 to
5a7bbae
Compare
Summary
On iOS Safari,
document.referreris not yet populated when the snippet capturesBufferedPageContextduring early script execution. This causescontext.page.referrerto be empty in all Segment calls for the session.Fix: re-read
document.referrerinpopPageContext()when the buffered value is empty.Chrome is unaffected — it populates
document.referrerbefore scripts execute.Test plan
popPageContext()referrer re-read (fail without fix, pass with)🤖 Generated with Claude Code