Sha256: 76c673f50b07a7190fe7e0350de7e56f49153741d95a20a8e9f1e64fa34744a8
Contents?: true
Size: 770 Bytes
Versions: 15
Compression:
Stored size: 770 Bytes
Contents
require('jquery') require('jquery-ujs') require('jquery.cookie') var _ = require('lodash') var is = require('is') require('./init/controllers') require('./init/forms') window.track = function(event, attributes, fn){ console.log("Track: " + event + " " + JSON.stringify(attributes)) if (is.fn(attributes)) fn = attributes, attributes = null; if (is.undefined(attributes)) { attributes = {} } if ($.cookie('invisible') == "true") { if (!is.undefined(fn)) { fn() } return } var attrs = _.extend({ iteration: $('body').data('iteration') }, attributes) if (typeof(analytics) != 'undefined') { analytics.track(event, attrs, fn); } if (typeof(amplitude) != 'undefined') { amplitude.getInstance().logEvent(event, attrs, fn); } }
Version data entries
15 entries across 15 versions & 2 rubygems