I
I
I'm Yoda2018-01-31 20:25:53
Web development
I'm Yoda, 2018-01-31 20:25:53

What data about the user should be collected to make your counter for the site?

Hello connoisseurs!
I want to make my own counter for the site. I searched the Internet, found a lot of interesting things, but I would like to *hear* your advice on how best to implement this? What data besides the user's IP to accept? And where is it better to store visit data in a database or in a file? I'm just asking for advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kim, 2018-01-31
@Anadi

If you just play around, then the answer to all your questions is the same: "it doesn't matter, do as you like."
If you want to conduct analytics on this data, then it will not be very convenient in the file, although it is most likely faster (adding each visit to the end), but in the database - that's it.
You can store IP, page visit time, number of repeated visits (using cookies, for example), if there is authorization - store logins, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question