Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(URL-overrides): Add metrics.

Hristo Terezova83618762037
diff --git a/react/features/analytics/functions.ts b/react/features/analytics/functions.ts
index 46674d434a..ad8ce3f008 100644
--- a/react/features/analytics/functions.ts
+++ b/react/features/analytics/functions.ts
@@ -185,13 +185,20 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
inIframe?: boolean;
isPromotedFromVisitor?: boolean;
isVisitor?: boolean;
+ overwritesCustomButtonsWithURL?: boolean;
overwritesDefaultLogoUrl?: boolean;
overwritesDeploymentUrls?: boolean;
+ overwritesEtherpadBase?: boolean;
+ overwritesHosts?: boolean;
+ overwritesIceServers?: boolean;
overwritesLiveStreamingUrls?: boolean;
overwritesPeopleSearchUrl?: boolean;
overwritesPrejoinConfigICEUrl?: boolean;
overwritesSalesforceUrl?: boolean;
overwritesSupportUrl?: boolean;
+ overwritesWatchRTCConfigParams?: boolean;
+ overwritesWatchRTCProxyUrl?: boolean;
+ overwritesWatchRTCWSUrl?: boolean;
server?: string;
tenant?: string;
wasLobbyVisible?: boolean;
@@ -235,6 +242,21 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
permanentProperties.overwritesSalesforceUrl = 'config.salesforceUrl' in params;
permanentProperties.overwritesPeopleSearchUrl = 'config.peopleSearchUrl' in params;
permanentProperties.overwritesDefaultLogoUrl = 'config.defaultLogoUrl' in params;
+ permanentProperties.overwritesEtherpadBase = 'config.etherpad_base' in params;
+ const hosts = params['config.hosts'] ?? {};
+ const hostsProps = [ 'anonymousdomain', 'authdomain', 'domain', 'focus', 'muc', 'visitorFocus' ];
+
+ permanentProperties.overwritesHosts = 'config.hosts' in params
+ || Boolean(hostsProps.find(p => `config.hosts.${p}` in params || (typeof hosts === 'object' && p in hosts)));
+
+ permanentProperties.overwritesWatchRTCConfigParams = 'config.watchRTCConfigParams' in params;
+ const watchRTCConfigParams = params['config.watchRTCConfigParams'] ?? {};
+
+ permanentProperties.overwritesWatchRTCProxyUrl = ('config.watchRTCConfigParams.proxyUrl' in params)
+ || (typeof watchRTCConfigParams === 'object' && 'proxyUrl' in watchRTCConfigParams);
+ permanentProperties.overwritesWatchRTCWSUrl = ('config.watchRTCConfigParams.wsUrl' in params)
+ || (typeof watchRTCConfigParams === 'object' && 'wsUrl' in watchRTCConfigParams);
+
const prejoinConfig = params['config.prejoinConfig'] ?? {};
permanentProperties.overwritesPrejoinConfigICEUrl = ('config.prejoinConfig.preCallTestICEUrl' in params)
@@ -260,6 +282,29 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
)
);
+ permanentProperties.overwritesIceServers = Boolean(Object.keys(params).find(k => k.startsWith('iceServers')));
+
+ const customToolbarButtons = params['config.customToolbarButtons'] ?? [];
+
+ permanentProperties.overwritesCustomButtonsWithURL = Boolean(
+ customToolbarButtons.find(({ icon }: { icon: string; }) => {
+ if (typeof icon !== 'string') { // The icon will be ignored
+ return false;
+ }
+
+ try {
+ const url = new URL(icon);
+
+ if (url.protocol === 'data:') {
+ return false;
+ }
+ } catch {
+ return false;
+ }
+
+ return true;
+ }));
+
// Optionally, include local deployment information based on the
// contents of window.config.deploymentInfo.
if (deploymentInfo) {