From a58f56e44241ccb4be03d08cc00040709db237c4 Mon Sep 17 00:00:00 2001 From: dimafa Date: Sat, 6 Jun 2026 06:57:48 -0400 Subject: [PATCH 1/2] Gate SimpleAnalytics injection behind VITE_APP_DISABLE_TRACKING The third-party SimpleAnalytics script (scripts.simpleanalyticscdn.com) was injected on every PROD build, ignoring VITE_APP_DISABLE_TRACKING. Self-hosters who set that flag (as the excalidraw-full deployment does) still shipped a third-party tracker that beacons page paths. Gate the injection on the flag, matching the existing template pattern used for VITE_APP_DEV_DISABLE_LIVE_RELOAD. Default behavior is unchanged when the flag is unset. Co-Authored-By: Claude Opus 4.8 --- excalidraw-app/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/excalidraw-app/index.html b/excalidraw-app/index.html index 7eac3e39a20f..a729d206df7d 100644 --- a/excalidraw-app/index.html +++ b/excalidraw-app/index.html @@ -216,8 +216,8 @@

Excalidraw

- <% if (typeof PROD != 'undefined' && PROD == true) { %> - + <% if (typeof PROD != 'undefined' && PROD == true && (typeof VITE_APP_DISABLE_TRACKING == 'undefined' || VITE_APP_DISABLE_TRACKING != 'yes')) { %> + - <% if (typeof PROD != 'undefined' && PROD == true && (typeof VITE_APP_DISABLE_TRACKING == 'undefined' || VITE_APP_DISABLE_TRACKING != 'yes')) { %> - + <% if (typeof PROD != 'undefined' && PROD == true && (typeof VITE_APP_DISABLE_TRACKING == 'undefined' || (VITE_APP_DISABLE_TRACKING != 'yes' && VITE_APP_DISABLE_TRACKING != 'true' && VITE_APP_DISABLE_TRACKING !== true))) { %> +