Skip to content

Instantly share code, notes, and snippets.

@refik
Last active December 15, 2015 12:59
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 refik/5264473 to your computer and use it in GitHub Desktop.
Save refik/5264473 to your computer and use it in GitHub Desktop.
marketing js
$(function(){
document.price_event_sent = false;
$(document).scroll(function(e){
top_offset = $('#trial').offset().top + $('#trial').height();
bottom_offset = $(document).scrollTop() + $(window).height();
if(!document.price_event_sent && (top_offset < bottom_offset)) {
// _gaq.push(['_trackPageview', 'mainpage-prices']);
document.price_event_sent = true;
console.log('OLDU');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment