Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

move GA id to deploymeny variables

AykutSarac25747ea028c1
diff --git a/.env b/.env
index b4d840a3..b6a491ec 100644
--- a/.env
+++ b/.env
@@ -1,3 +1,2 @@
-NEXT_PUBLIC_GA_MEASUREMENT_ID=G-JKZEHMJBMH
NEXT_PUBLIC_NODE_LIMIT=600
NEXT_TELEMETRY_DISABLED=1
\ No newline at end of file
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 9a0c642d..5560f2b5 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -67,6 +67,8 @@ jobs:
- name: Build with Next.js
run: pnpm next build
+ env:
+ NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ vars.NEXT_PUBLIC_GA_MEASUREMENT_ID }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index c0d47643..43752e66 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -52,8 +52,6 @@ const theme = createTheme({
},
});
-const IS_PROD = process.env.NODE_ENV === "production";
-
function JsonCrack({ Component, pageProps }: AppProps) {
const { pathname } = useRouter();
@@ -99,7 +97,7 @@ function JsonCrack({ Component, pageProps }: AppProps) {
}}
/>
<GlobalStyle />
- {IS_PROD && <GoogleAnalytics trackPageViews />}
+ {process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID && <GoogleAnalytics trackPageViews />}
<Component {...pageProps} />
</ThemeProvider>
</MantineProvider>