Merge pull request #2357 from bgrozev/analytics-update

Analytics update
This commit is contained in:
virtuacoplenny 2018-01-04 12:32:07 -08:00 committed by GitHub
commit 9eff669b0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -39,17 +39,19 @@ export function initAnalytics({ getState }: { getState: Function }) {
const state = getState();
const config = state['features/base/config'];
const { analyticsScriptUrls } = config;
const { user } = state['features/base/jwt'];
const { analyticsScriptUrls, deploymentInfo } = config;
const { group, server, user } = state['features/base/jwt'];
const handlerConstructorOptions = {
version: JitsiMeetJS.version,
user
envType: (deploymentInfo && deploymentInfo.envType) || 'dev',
group,
subproduct: deploymentInfo && deploymentInfo.environment,
user,
version: JitsiMeetJS.version
};
_loadHandlers(analyticsScriptUrls, handlerConstructorOptions)
.then(handlers => {
const roomName = state['features/base/conference'].room;
const { group, server } = state['features/base/jwt'];
const permanentProperties = {};
if (server) {
@ -61,8 +63,6 @@ export function initAnalytics({ getState }: { getState: Function }) {
// Optionally, include local deployment information based on the
// contents of window.config.deploymentInfo.
const { deploymentInfo } = config;
if (deploymentInfo) {
for (const key in deploymentInfo) {
if (deploymentInfo.hasOwnProperty(key)) {