diff --git a/src/components/Analytics/Plausible.tsx b/src/components/Analytics/Plausible.tsx
index b0b1c82a6ef85..49cb60042f44c 100644
--- a/src/components/Analytics/Plausible.tsx
+++ b/src/components/Analytics/Plausible.tsx
@@ -5,14 +5,17 @@ import { memo } from 'react';
import { getClientConfig } from '@/config/client';
-const { PLAUSIBLE_DOMAIN } = getClientConfig();
+const { PLAUSIBLE_DOMAIN, PLAUSIBLE_SCRIPT_BASE_URL } = getClientConfig();
-const PlausibleAnalytics = memo(() => {
- return (
+const PlausibleAnalytics = memo(
+ () =>
PLAUSIBLE_DOMAIN && (
-
- )
- );
-});
+
+ ),
+);
export default PlausibleAnalytics;
diff --git a/src/config/client.ts b/src/config/client.ts
index 744637ef110ee..e6e4ff30e75e2 100644
--- a/src/config/client.ts
+++ b/src/config/client.ts
@@ -16,6 +16,7 @@ declare global {
NEXT_PUBLIC_ANALYTICS_PLAUSIBLE?: string;
NEXT_PUBLIC_PLAUSIBLE_DOMAIN?: string;
+ NEXT_PUBLIC_PLAUSIBLE_SCRIPT_BASE_URL?: string;
NEXT_PUBLIC_ANALYTICS_POSTHOG: string;
NEXT_PUBLIC_POSTHOG_KEY: string;
@@ -40,6 +41,8 @@ export const getClientConfig = () => ({
// Plausible Analytics
ANALYTICS_PLAUSIBLE: process.env.NEXT_PUBLIC_ANALYTICS_PLAUSIBLE === '1',
PLAUSIBLE_DOMAIN: process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN,
+ PLAUSIBLE_SCRIPT_BASE_URL:
+ process.env.NEXT_PUBLIC_PLAUSIBLE_SCRIPT_BASE_URL || 'https://plausible.io',
// Posthog Analytics
ANALYTICS_POSTHOG: process.env.NEXT_PUBLIC_ANALYTICS_POSTHOG === '1',