0

Is their any way for display visitor count on home page using vue js? or any other script technology?

if (sessionStorage.clickcount)
  { sessionStorage.clickcount=Number(sessionStorage.clic  kcount)+1;
  }
else
  {
    sessionStorage.clickcount=1;
  }

this display session click count only

  • Just use google analytics and save yourself the trouble of reinventing the wheel. –  Apr 08 '17 at 19:56

1 Answers1

1

For visitors count you should do it server-side. Because everything you in client-side is only related to the current user only.

If you want count current user visits from the current browser:

  • for this session you can use sessionStorage
  • for all time you can use localStorage
Mohamed Abbas
  • 2,228
  • 1
  • 11
  • 19