Skip to content

a vanilla javascript plugin for tracking scroll depth

Notifications You must be signed in to change notification settings

dolead/js-scrolldepth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

js-scrolldepth

A simple vanilla javascript plugin to track scroll depth. A lot of this was borrowed from @robflaherty. I needed a stripped-down version that didn't require jQuery as a dependency.

Tested on: Chrome, Firefox, Safari, IE7-11

To initialize: simply add the script to your webpage.

Currently I'm logging (console.log):

  • baseline - fired when plugin loads
  • scrolled 25%
  • scrolled 50%
  • scrolled 75%
  • scrolled 100%

You can drop-in any analytics code in place of the console.log.

About

a vanilla javascript plugin for tracking scroll depth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%