fix analytics script and event logging
Merge pull request #249 from ryanpitts/development

fix analytics script and event logging