Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

chore: disable Vercel Web Analytics in development

Sidwebworksc4dbfcae0a30
diff --git a/apps/academy/app/root.tsx b/apps/academy/app/root.tsx
index 2d0557ae6a..aa187cd0fa 100644
--- a/apps/academy/app/root.tsx
+++ b/apps/academy/app/root.tsx
@@ -229,7 +229,7 @@ function Document({
<Toaster position="bottom-right" visibleToasts={5} />
<ScrollRestoration />
<Scripts />
- {!CONTROLLED_ENVIRONMENT && <Analytics />}
+ {!CONTROLLED_ENVIRONMENT && import.meta.env.PROD && <Analytics />}
</body>
</html>
);
diff --git a/apps/erp/app/root.tsx b/apps/erp/app/root.tsx
index e56fb6524a..df906cb377 100644
--- a/apps/erp/app/root.tsx
+++ b/apps/erp/app/root.tsx
@@ -253,7 +253,7 @@ export function Document({
<Toaster position="bottom-right" visibleToasts={5} />
<ScrollRestoration />
<Scripts />
- {!CONTROLLED_ENVIRONMENT && <Analytics />}
+ {!CONTROLLED_ENVIRONMENT && import.meta.env.PROD && <Analytics />}
</body>
</html>
);
diff --git a/apps/mes/app/root.tsx b/apps/mes/app/root.tsx
index 89a4d3cb6e..8738a8f0c6 100644
--- a/apps/mes/app/root.tsx
+++ b/apps/mes/app/root.tsx
@@ -234,7 +234,7 @@ function Document({
<Toaster position="bottom-right" visibleToasts={5} />
<ScrollRestoration />
<Scripts />
- {!CONTROLLED_ENVIRONMENT && <Analytics />}
+ {!CONTROLLED_ENVIRONMENT && import.meta.env.PROD && <Analytics />}
</body>
</html>
);
diff --git a/apps/starter/app/root.tsx b/apps/starter/app/root.tsx
index 46f5903788..3d156d7390 100644
--- a/apps/starter/app/root.tsx
+++ b/apps/starter/app/root.tsx
@@ -197,7 +197,7 @@ function Document({
<Toaster position="bottom-right" visibleToasts={5} />
<ScrollRestoration />
<Scripts />
- {!CONTROLLED_ENVIRONMENT && <Analytics />}
+ {!CONTROLLED_ENVIRONMENT && import.meta.env.PROD && <Analytics />}
</body>
</html>
);