crowdstart-analytics
Advanced tools
Comparing version 0.1.0 to 0.1.1
// Generated by CoffeeScript 1.9.3 | ||
var Analytics, | ||
var Analytics, Integration, | ||
slice = [].slice; | ||
Integration = require('./integration'); | ||
module.exports = Analytics = (function() { | ||
@@ -9,2 +11,7 @@ function Analytics() { | ||
this.integrations = []; | ||
Integration.prototype.log = (function(_this) { | ||
return function() { | ||
return _this.log.apply(_this, arguments); | ||
}; | ||
})(this); | ||
ref = ['addedProduct', 'completedCheckoutStep', 'completedOrder', 'experimentViewed', 'removedProduct', 'viewedCheckoutStep', 'viewedProduct', 'viewedProductCategory']; | ||
@@ -25,4 +32,4 @@ for (i = 0, len = ref.length; i < len; i++) { | ||
} | ||
fn(); | ||
return this.log('Analytics.ready'); | ||
this.log('Analytics.ready'); | ||
return fn(); | ||
}; | ||
@@ -47,7 +54,2 @@ | ||
instance.load(); | ||
instance.log = (function(_this) { | ||
return function() { | ||
return _this.log.apply(_this, arguments); | ||
}; | ||
})(this); | ||
results.push(this.integrations.push(instance)); | ||
@@ -54,0 +56,0 @@ } |
@@ -8,2 +8,6 @@ // Generated by CoffeeScript 1.9.3 | ||
if (stub.debug) { | ||
analytics.debug(); | ||
} | ||
analytics.initialize({}); | ||
@@ -10,0 +14,0 @@ |
@@ -13,3 +13,5 @@ // Generated by CoffeeScript 1.9.3 | ||
Integration.prototype.init = function() {}; | ||
Integration.prototype.init = function() { | ||
return this.log('Integration.init'); | ||
}; | ||
@@ -20,2 +22,3 @@ Integration.prototype.load = function(cb) { | ||
} | ||
this.log('Integration.load', this.type); | ||
switch (this.type) { | ||
@@ -22,0 +25,0 @@ case 'script': |
{ | ||
"name": "crowdstart-analytics", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Analytics support for Crowdstart.", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139144
1810