Visitor counter | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Visitor counter

I need a visitor counter for my website which save the number of visitors.

26th Jun 2019, 7:47 AM
Barni Ilyes
Barni Ilyes - avatar
3 Answers
0
Hello! This forum is for people seeking help with code they have already written, you can't expect other people to do all the work for you because it isn't fair and you won't learn anything. Please show us the attempt you have made and we'd be happy to help.
26th Jun 2019, 7:49 AM
Rincewind
Rincewind - avatar
0
Google Analytics? I think you need backend to store the number, or it can be done by only JavaScript if it only for display
26th Jun 2019, 8:02 AM
yuulye
yuulye - avatar
0
create a persistent storage, you can create and save your own file in serverside or simply using database. once someone visit your web check if there is any cookie from your web, if there isnt then its a new visitor, update your visitor count and create a cookie fot that visitor.
26th Jun 2019, 8:18 AM
Taste
Taste - avatar