Skip to content

Commit

Permalink
feat(URL): Add metrics for config overwrites.
Browse files Browse the repository at this point in the history
Add temporary metrics for interfaceConfig and config url overwrites.
  • Loading branch information
hristoterezov committed Nov 22, 2024
1 parent c2f4dd9 commit 009b080
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions react/features/analytics/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -176,13 +177,20 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): 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;
group?: string;
inIframe?: boolean;
isPromotedFromVisitor?: boolean;
isVisitor?: boolean;
overwritesDefaultLogoUrl?: boolean;
overwritesDeploymentUrls?: boolean;
overwritesPeopleSearchUrl?: boolean;
overwritesPrejoinConfigICEUrl?: boolean;
overwritesSalesforceUrl?: boolean;
overwritesSupportUrl?: boolean;
server?: string;
tenant?: string;
wasLobbyVisible?: boolean;
Expand Down Expand Up @@ -221,6 +229,14 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): 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) {
Expand Down

0 comments on commit 009b080

Please sign in to comment.