Click counter using html data attribute

95 views Asked by At

Having a collection of articles in divs each divs have a data attribute "data-click" the purpose is to store the number of click on each article

My question is : Is it possible to code a click counter using only the data-attribute but in server side, i mean each time a user click on article, the "data-click" attribute change in the server side (html code of the website).

The purpose is to create a dynamic table of most read articles ...

Thanks.

1

There are 1 answers

0
SIREN On

No. There are no such thing as a server side data attribute.