Skip to content

Prototype for counting the number of visits on a website client-side (JS), based on a visit duration time, working with first-party cookies.

License

Notifications You must be signed in to change notification settings

BenDz/client-side-visit-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Client-side visit counter

Prototype for counting the number of visits on a website client-side (JS), based on a visit duration time. Works with first-party cookies and localStorage.

Usage

console.log(storedVisits.visits.all); // Number of visits all time
console.log(storedVisits.visits.month); // Number of visits for the current month
console.log(storedVisits.visits.week); // Number of visits for the current week (starts on monday)

About

Prototype for counting the number of visits on a website client-side (JS), based on a visit duration time, working with first-party cookies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published