M
M
MrRob0t2018-05-22 21:07:20
ASP.NET
MrRob0t, 2018-05-22 21:07:20

How to create a unique pageview counter using C# and Asp.Net Core?

I need the counter to count only unique views or after some time.
Where can I read about this or maybe someone has an example

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Peter, 2018-05-23
@petermzg

A user has entered, check for the presence of an installed cookie with the name you need, if it is not there, then the user is new, take it into account and set a cookie with a life of 3 months. (for example)

M
MrDywar Pichugin, 2018-05-23
@Dywar

Like Peter says or something like that or nothing.
HTTP
HTTP_header_field Write in
more detail what is the uniqueness criterion in your case.
One device, one browser, one user or whatever.
Need statistics for all pages, or for one.
You can use JS or not.
JS can get a lot of information.
Google - how google analytics work.
C# by itself will not be able to do anything in your case, except for cookies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question