📈(addon) allow appending an Outlook source query param to the URL

Offer the possibility to append a query parameter at the end of the
meeting URL to flag links created from the Outlook plugin, inspired
by Zoom.

The behavior is toggled via an environment variable.
This commit is contained in:
lebaudantoine
2026-06-10 14:32:54 +02:00
committed by aleb_the_flash
parent 09dbb250a7
commit 9522dc72ac
5 changed files with 17 additions and 3 deletions
+2
View File
@@ -1,7 +1,9 @@
const BASE_URL = window.__APP_CONFIG__?.BASE_URL || "https://meet.127.0.0.1.nip.io";
const APP_NAME = window.__APP_CONFIG__?.APP_NAME || "LaSuite Meet";
const ENABLE_SOURCE_TRACKING = window.__APP_CONFIG__?.ENABLE_SOURCE_TRACKING === "true";
module.exports = {
BASE_URL,
APP_NAME,
ENABLE_SOURCE_TRACKING,
};
@@ -1,4 +1,4 @@
const { APP_NAME } = require("./index");
const { APP_NAME, ENABLE_SOURCE_TRACKING } = require("./index");
const { t } = require("./i18n");
function _formatPin(pin) {
@@ -21,13 +21,21 @@ function _formatPhone(phone) {
return clean;
}
function _appendTrackingParams(url) {
if (!ENABLE_SOURCE_TRACKING) return url;
const u = new URL(url);
u.searchParams.set("from", "outlook-addin");
return u.toString();
}
// todo - escape html / link
function buildMeetingMessage(data, isWeb) {
if (!data?.url) {
throw new Error("buildMeetingMessage: missing url in data");
}
const url = data.url;
const url = _appendTrackingParams(data.url);
const phone = _formatPhone(data.telephony?.phone_number);
const pin = _formatPin(data.telephony?.pin_code);
@@ -37,5 +37,6 @@ frontend:
outlookAddon:
enabled: true
baseUrl: "https://meet.127.0.0.1.nip.io"
enableSourceTracking: true
appName: "Visio"
id: "a025f0f6-757a-4790-97f3-99c66c4a5795"
@@ -8,6 +8,7 @@ data:
config.js: |
window.__APP_CONFIG__ = {
BASE_URL: {{ .Values.frontend.outlookAddon.baseUrl | quote }},
APP_NAME: {{ .Values.frontend.outlookAddon.appName | quote }}
APP_NAME: {{ .Values.frontend.outlookAddon.appName | quote }},
ENABLE_SOURCE_TRACKING: {{ .Values.frontend.outlookAddon.enableSourceTracking | quote }},
};
{{- end }}
+2
View File
@@ -448,10 +448,12 @@ frontend:
## @param frontend.outlookAddon.enabled Enable the Outlook add-in ConfigMap (config.js + manifest.xml)
## @param frontend.outlookAddon.appName Display name used in the Outlook add-in (manifest + runtime config)
## @param frontend.outlookAddon.baseUrl Public base URL where the add-in is served (no trailing slash)
## @param frontend.outlookAddon.enableSourceTracking Enable appending ?from=outlook-addon to the URL
outlookAddon:
enabled: false
appName: ""
baseUrl: ""
enableSourceTracking: false
id: ""
## @section posthog