Added config options for logging clicks and ajax calls.

This commit is contained in:
Martin Edenhofer 2016-05-18 08:44:46 +02:00
parent dc263fb92a
commit b745bce6ac

View file

@ -32,17 +32,21 @@ class _trackSingleton
@data = []
# @url = 'http://localhost:3005/api/v1/ui'
@url = 'https://log.zammad.com/api/v1/ui'
@logClick = true
@logAjax = false
@forceSending = false
@log('start', 'notice', {})
# start initial submit 30 sec. later to avoid ie10 cookie issues
delay = =>
App.Interval.set @send, 60000
App.Delay.set delay, 30000
# log clicks
if @logClick
$(document).bind(
'click'
(e) =>
@ -66,7 +70,7 @@ class _trackSingleton
)
# log ajax calls
### disabled, only needed for debugging
if @logAjax
$(document).bind( 'ajaxComplete', ( e, request, settings ) =>
# do not log ui requests
@ -101,7 +105,6 @@ class _trackSingleton
}
)
)
###
$(window).bind(
'beforeunload'