Only sample the clickstream. Log 1 in every 100 clicks.
Refactor to avoid a very log if/else statement
jshint