How to get number of visitors as a count in a web page (portfolio) in Angular?
JavaScript/jQuery/HTML/CSS code will be appreciated.
Loading
How to get number of visitors as a count in a web page (portfolio) in Angular?
JavaScript/jQuery/HTML/CSS code will be appreciated.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Jun 10, 2021, 8:39 PM
At first, I want to tell you that it's impossible to achieve it solely using client-side languages until you use a third-party library that will store the info on the server for you as you don't want to use the server-side things.
So, you can use Count.IO which is very dangerous, because if anyone knows the string you use then he will be able to hack the system.
here is the code.
step 1. Call the below function from your portfolio page. (ready function is enough to call it)
step 2. Call the below function where you want to display the user's count
Note:- myCountString, is a random string that I used, you can use anything here, but if anybody knows it then, he can hack your system.