I am writing my own home page in html
and javascript
.
I have many hyperlinks on the home page, which interests me is, how many times visitors of my page click on them.
For instance, <a href="paper.pdf">pdf</a>
is a hyperlink which directs to downloading a pdf file. I would like to set up a mechanism of counter of clicking on it. For instance this information is automatically recorded in a file so that I could check it from time to time.
Besides counter, other information such as the time of clicking, the IP of visitors who click interest me too. It will be great if I can record them.
I don't know javascript
, could anyone suggest me an efficient way to realize this with details (or a piece of code)?