codexilab / osclass-banners

Manage banners and its positions in the site
MIT License
2 stars 0 forks source link

Click bombing prevention #10

Open Tangol opened 2 years ago

Tangol commented 2 years ago

At the moment, the plugin registers every time a user clicks on the banner. So if a user clicks 50 times in 50 seconds, the plugin will return 50 clicks.

Is there a way/reason to prevent this by using a JS like this one? The idea is to generate a cookie with an expiration of 24 hours (maybe) or longer, each time a user clicks on the banner.

There's no need for complicated IP storing/checks, as it would be too much, and would complicate stuff, so a cookie would be the easiest way.

What do you think?

adrianolmedo commented 2 years ago

The idea is good.

What happens if they disable JS? It would have to be implemented from PHP.

Tangol commented 2 years ago

Yeah, I was thinking of just a quick and simple solution for the average user that clicks on banners.

Indeed the PHP side would work better and also would give the posibility to keep track of clicks done on every banner position. So if the user clicks on banner 1 - that banner is saved for 24 hours, then he clicks on banner 2 - that banner also gets saved for 24 hours, and so on.