Преглед на файлове

include local.html file meant to define local analytics properties (#1612)

* include local.html file meant to define local analytics properties
include all specified local analytics properties in analytics events

* use new variable name jitsiDeploymentInfo to represent more general use as local deployment information collection
master
Aaron van Meerten преди 8 години
родител
ревизия
6d1a018864
променени са 3 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 1
    0
      index.html
  2. 0
    0
      local.html
  3. 11
    0
      modules/analytics/analytics.js

+ 1
- 0
index.html Целия файл

@@ -4,6 +4,7 @@
4 4
     <meta http-equiv="content-type" content="text/html;charset=utf-8">
5 5
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 6
     <!--#include virtual="base.html" -->
7
+    <!--#include virtual="local.html" -->
7 8
     <script>
8 9
         window.indexLoadedTime = window.performance.now();
9 10
         console.log("(TIME) index.html loaded:\t", indexLoadedTime);

+ 0
- 0
local.html Целия файл


+ 11
- 0
modules/analytics/analytics.js Целия файл

@@ -122,6 +122,17 @@ class Analytics {
122 122
                 if (group) {
123 123
                     permanentProperties.group = group;
124 124
                 }
125
+                /**
126
+                 * optionally include local deployment information,
127
+                 * window.jitsiDeploymentInfo defined outside of application
128
+                 * to use, override contents in local.html
129
+                **/
130
+                if (window.jitsiDeploymentInfo) {
131
+                    for (var key in window.jitsiDeploymentInfo) {
132
+                        permanentProperties[key] 
133
+                            = window.jitsiDeploymentInfo[key];
134
+                    }
135
+                }
125 136
 
126 137
                 analytics.addPermanentProperties(permanentProperties);
127 138
                 analytics.setAnalyticsHandlers(handlers);

Loading…
Отказ
Запис