Ask coding questions

← Back to all posts
Number of Views in html
51LV3RC0D3R

Is there a way to track the number of views using html?

Answered by ch1ck3n [earned 5 cycles]
View Answer
Voters
51LV3RC0D3R
Comments
hotnewtop
VulcanWM

You can try using those view counters and just putting the code they say onto your repl

51LV3RC0D3R

@VulcanWM what are some good view counters?

ch1ck3n
51LV3RC0D3R

@ch1ck3n Thanks!

Xenity

you would need to use javascript to add 1 to a variable each time the page loads and display that variable by using innerhtml (https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML)

ch1ck3n

@Xenity And how exactly would that data be available to all other users on the website