From 009b080dd187bd2758dfda34b97a1f746d760f51 Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Fri, 22 Nov 2024 17:32:33 -0600 Subject: [PATCH] feat(URL): Add metrics for config overwrites. Add temporary metrics for interfaceConfig and config url overwrites. --- react/features/analytics/functions.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/react/features/analytics/functions.ts b/react/features/analytics/functions.ts index 2b787b25899..52078dd7448 100644 --- a/react/features/analytics/functions.ts +++ b/react/features/analytics/functions.ts @@ -15,6 +15,7 @@ import { isAnalyticsEnabled } from '../base/lib-jitsi-meet/functions.any'; import { getJitsiMeetGlobalNS } from '../base/util/helpers'; import { inIframe } from '../base/util/iframeUtils'; import { loadScript } from '../base/util/loadScript'; +import { parseURLParams } from '../base/util/parseURLParams'; import { parseURIString } from '../base/util/uri'; import { isPrejoinPageVisible } from '../prejoin/functions'; @@ -176,6 +177,7 @@ export function initAnalytics(store: IStore, handlers: Array): boolean { const { group, server } = state['features/base/jwt']; const { locationURL = { href: '' } } = state['features/base/connection']; const { tenant } = parseURIString(locationURL.href) || {}; + const params = parseURLParams(locationURL.href) ?? {}; const permanentProperties: { appName?: string; externalApi?: boolean; @@ -183,6 +185,12 @@ export function initAnalytics(store: IStore, handlers: Array): boolean { inIframe?: boolean; isPromotedFromVisitor?: boolean; isVisitor?: boolean; + overwritesDefaultLogoUrl?: boolean; + overwritesDeploymentUrls?: boolean; + overwritesPeopleSearchUrl?: boolean; + overwritesPrejoinConfigICEUrl?: boolean; + overwritesSalesforceUrl?: boolean; + overwritesSupportUrl?: boolean; server?: string; tenant?: string; wasLobbyVisible?: boolean; @@ -221,6 +229,14 @@ export function initAnalytics(store: IStore, handlers: Array): boolean { permanentProperties.isVisitor = false; permanentProperties.isPromotedFromVisitor = false; + // TODO: Temporary metric. To be removed once we don't need it. + permanentProperties.overwritesSupportUrl = 'interfaceConfig.SUPPORT_URL' in params; + permanentProperties.overwritesSalesforceUrl = 'config.salesforceUrl' in params; + permanentProperties.overwritesPeopleSearchUrl = 'config.peopleSearchUrl' in params; + permanentProperties.overwritesDeploymentUrls = 'config.deploymentUrls' in params; + permanentProperties.overwritesDefaultLogoUrl = 'config.defaultLogoUrl' in params; + permanentProperties.overwritesPrejoinConfigICEUrl = 'config.prejoinConfig.preCallTestICEUrl' in params; + // Optionally, include local deployment information based on the // contents of window.config.deploymentInfo. if (deploymentInfo) {