3 ms·
Ask HN: How does Google Analytics, a client-side script, get referring URLs?
Shower thought: given that Google Analytics is installed by dropping a JavaScript snippet onto the page, how does Google get the referring page when visitors land on the page via link or search result, etc.?
- Hackbraten 6y agoThe script should be able to read `Document.referrer` and post the result to wherever it wants.
- mjswensen 6y agoThere it is. Thank you!