Hi,
You can use global.asax file, in that find Application_Start (or Session_Start) & Application_End events wherein you can write the logic to log the site traffic and user info, etc.
For more information on Global.asax file, check this:
Global.asax in ASP.NET[
^]