D
D
Diamond2016-07-19 00:55:26
DLE
Diamond, 2016-07-19 00:55:26

How to count the number of views without repeats?

I need to count the number of views to the news, but only so that from one ip = 1 view. Do not think long climbed to look in the PS and stumbled upon this " hack ". Here all ips are recorded in the ip_veiws field (in the database) and it seems to me that this is not good, because if the site is with a lot of traffic, then an incredible number of ip addresses will be recorded there, and moreover, for each news.
Isn't it better to save the visited news in the user's cookies, let's store at least a day?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zakhar Storozhuk, 2016-07-19
@Arios

In the dle settings you can specify.
System settings > Database query optimization > News views counter > Count only unique views.
Save.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question