As I embark on building my own analytics tool, I find myself in need of determining the sources of incoming requests using only JavaScript. It's hard to believe that the browser doesn't store somewhere in its window object a variable indicating the origin of each request. My search for information online has been fruitless so far, leaving me wondering if I might not be asking the right question.
If anyone out there has faced and solved this issue before, I would greatly appreciate any guidance. Thanks in advance!