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
This commit is contained in:
Aaron van Meerten 2017-05-30 13:37:43 -05:00 committed by Дамян Минков
parent 320e67baa1
commit 6d1a018864
3 changed files with 12 additions and 0 deletions

View File

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

0
local.html Normal file
View File

View File

@ -122,6 +122,17 @@ class Analytics {
if (group) {
permanentProperties.group = group;
}
/**
* optionally include local deployment information,
* window.jitsiDeploymentInfo defined outside of application
* to use, override contents in local.html
**/
if (window.jitsiDeploymentInfo) {
for (var key in window.jitsiDeploymentInfo) {
permanentProperties[key]
= window.jitsiDeploymentInfo[key];
}
}
analytics.addPermanentProperties(permanentProperties);
analytics.setAnalyticsHandlers(handlers);