|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+/* global config */
|
|
|
2
|
+
|
|
1
|
3
|
var ScriptUtil = require('../util/ScriptUtil');
|
|
2
|
4
|
|
|
3
|
5
|
// Load the integration of a third-party analytics API such as Google Analytics.
|
|
|
@@ -33,7 +35,9 @@ AnalyticsAdapter.prototype.sendEvent = function (action, data) {
|
|
33
|
35
|
var a = this.analytics;
|
|
34
|
36
|
|
|
35
|
37
|
if (a === null || typeof a === 'undefined') {
|
|
36
|
|
- this.analytics = a = new (window.Analytics || NoopAnalytics)();
|
|
|
38
|
+ var AnalyticsImpl = window.Analytics || NoopAnalytics;
|
|
|
39
|
+
|
|
|
40
|
+ this.analytics = a = new AnalyticsImpl();
|
|
37
|
41
|
}
|
|
38
|
42
|
try {
|
|
39
|
43
|
a.sendEvent.apply(a, arguments);
|