feat: Passes the environment type and subproduct to the analytics handler constructor.
This commit is contained in:
parent
e898527294
commit
c7714959e6
|
@ -39,10 +39,12 @@ export function initAnalytics({ getState }: { getState: Function }) {
|
||||||
|
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const config = state['features/base/config'];
|
const config = state['features/base/config'];
|
||||||
const { analyticsScriptUrls } = config;
|
const { analyticsScriptUrls, deploymentInfo } = config;
|
||||||
const { group, server, user } = state['features/base/jwt'];
|
const { group, server, user } = state['features/base/jwt'];
|
||||||
const handlerConstructorOptions = {
|
const handlerConstructorOptions = {
|
||||||
|
envType: (deploymentInfo && deploymentInfo.envType) || 'dev',
|
||||||
group,
|
group,
|
||||||
|
subproduct: deploymentInfo && deploymentInfo.environment,
|
||||||
user,
|
user,
|
||||||
version: JitsiMeetJS.version
|
version: JitsiMeetJS.version
|
||||||
};
|
};
|
||||||
|
@ -61,8 +63,6 @@ export function initAnalytics({ getState }: { getState: Function }) {
|
||||||
|
|
||||||
// Optionally, include local deployment information based on the
|
// Optionally, include local deployment information based on the
|
||||||
// contents of window.config.deploymentInfo.
|
// contents of window.config.deploymentInfo.
|
||||||
const { deploymentInfo } = config;
|
|
||||||
|
|
||||||
if (deploymentInfo) {
|
if (deploymentInfo) {
|
||||||
for (const key in deploymentInfo) {
|
for (const key in deploymentInfo) {
|
||||||
if (deploymentInfo.hasOwnProperty(key)) {
|
if (deploymentInfo.hasOwnProperty(key)) {
|
||||||
|
|
Loading…
Reference in New Issue