Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Decides whether to use analytics after the analytics API has been given a chance to load.

Lyubomir Marinovec954ad3cc67
diff --git a/modules/statistics/AnalyticsAdapter.js b/modules/statistics/AnalyticsAdapter.js
index e57c2caa69..11cd92df03 100644
--- a/modules/statistics/AnalyticsAdapter.js
+++ b/modules/statistics/AnalyticsAdapter.js
@@ -1,3 +1,5 @@
+/* global config */
+
var ScriptUtil = require('../util/ScriptUtil');
// Load the integration of a third-party analytics API such as Google Analytics.
@@ -33,7 +35,9 @@ AnalyticsAdapter.prototype.sendEvent = function (action, data) {
var a = this.analytics;
if (a === null || typeof a === 'undefined') {
- this.analytics = a = new (window.Analytics || NoopAnalytics)();
+ var AnalyticsImpl = window.Analytics || NoopAnalytics;
+
+ this.analytics = a = new AnalyticsImpl();
}
try {
a.sendEvent.apply(a, arguments);