Skip to content

Instantly share code, notes, and snippets.

@charliefmoran
Created May 20, 2014 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charliefmoran/a8250aa231298535a962 to your computer and use it in GitHub Desktop.
Save charliefmoran/a8250aa231298535a962 to your computer and use it in GitHub Desktop.
Optimizely scroll start custom event
$(document).ready(function(){
(function($, document){
$(document).scroll(function() {
window['optimizely'] = window['optimizely'] || [];
window.optimizely.push(["trackEvent", "scroll_start"]);
$(this).off("scroll");
});
})(window.$, document);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment