This project helps you to record what visitors have you on the site. It does not enforce authentication
You can see the latest 5 minutes visitors by browsing to /recordVisitors/AllVisitors5Min or /recordVisitors/AllVisitors/5
In Startup,
public void ConfigureServices(IServiceCollection services)
{
//code omitted
services.AddRecordVisitorsDefault();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//code omitted
app.UseAuthentication();
//put AFTER authentication
app.UseRecordVisitors();
//not necessary
app.UseAuthorization();
//code omitted
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.UseVisitors();
});
}
Then browse to /recordVisitors/AllVisitors5Min or /recordVisitors/AllVisitors/5
You can see also the history for the URL that the user have browsed : goto /recordVisitors/UserHistory/{userId}/{dateFrom:datetime:regex(\d{{4}}-\d{{2}}-\d{{2}})}/{dateTo?}
( to find the user id , you can also goto /recordVisitors/GetUserId/{userName})
You can see also the classes documentation at https://ignatandrei.github.io/RecordVisitors/RecordVisitors/
There are several interfaces that you can implement via DI
Name | Description |
---|---|
IRecordVisitorFunctions | how to indentify the user |
IRequestRecorded | request of the user |
IUserRecorded | the user recorded interface to store data |
IUsersRepository | the connection to the storage( database, csv , others) |
The project comes with his implementation - however, you can add yours.
Thanks goes to these wonderful people (emoji key):
Andrei Ignat |
This project follows the all-contributors specification. Contributions of any kind welcome!
Also, thanks to the people that made this possible by created frameworks and libraries - see the list here
https://github.com/ignatandrei/RecordVisitors/blob/main/src/RecordVisitors/thanks.md
- Project homepage: https://github.com/ignatandrei/RecordVisitors
- Code Coverage: https://codecov.io/gh/ignatandrei/RecordVisitors
- Results of tests in BDD format : https://record-visitors.readthedocs.io/en/latest/BDD/LightBDDReport/
- Code analysis: https://sonarcloud.io/dashboard?id=ignatandrei_RecordVisitors
- Repository: https://github.com/ignatandrei/RecordVisitors/
- Issue tracker: https://github.com/ignatandrei/RecordVisitors/issues
- Documentation: https://record-visitors.readthedocs.io/en/latest/
- Blog: http://msprogrammer.serviciipeweb.ro/category/recordvisitors/
The code in this project is licensed under MIT license. You can find the licences for the packages used at https://github.com/ignatandrei/RecordVisitors/blob/main/src/RecordVisitors/licenses.txt