I am working on an ASP.NET Core 2.1 application that uses ReactJS on the client and would like to log the urls entered explicitly in the browser for tracking purposes. For example, I would like to know when a user explicitly enters: http://myapp.com/; http://myapp.com/contact; http://myapp.com/help; etc... in the browser. I'm able to track when a user clicks on various links once they're already in http://myapp.com using Javascript, but it's when a user enters it directly in the browser (or clicks on a link from a google search) that I'm currently unable to track.
I've been looking at url middleware rewrite as well as trying to find a way to access the HttpContext from something like ConfigureServices in the Startup class, but I'm not able to figure this out.
Any help would be appreciated.