diff --git a/.env.local.example b/.env.local.example
index 0592f3b4a..5b058d208 100644
--- a/.env.local.example
+++ b/.env.local.example
@@ -3,4 +3,5 @@ CMS_API_KEY=""
CMS_ENVIRONMENT="development"
CMS_URL="https://eu-graphql.contentstack.com/stacks/${CMS_API_KEY}?environment=${CMS_ENVIRONMENT}"
CMS_PREVIEW_URL="https://graphql-preview.contentstack.com/stacks/${CMS_API_KEY}?environment=${CMS_ENVIRONMENT}";
-CMS_PREVIEW_TOKEN=""
\ No newline at end of file
+CMS_PREVIEW_TOKEN=""
+ADOBE_SCRIPT_SRC=""
\ No newline at end of file
diff --git a/components/Current/AdobeScript.tsx b/components/Current/AdobeScript.tsx
index b52508b2d..197347235 100644
--- a/components/Current/AdobeScript.tsx
+++ b/components/Current/AdobeScript.tsx
@@ -2,22 +2,14 @@ import { env } from "@/env/server"
import Script from "next/script"
-const scriptScrs = {
- // TODO: decide on naming and environments (development vs. test vs. staging etc)
- development: "",
- test: "https://assets.adobedtm.com/c1bd08b1e4e7/d64a7c1f5f17/launch-84c70d82a50c-staging.min.js",
- production:
- "https://assets.adobedtm.com/c1bd08b1e4e7/d64a7c1f5f17/launch-e56085bbe998.min.js",
-}
-
export default function AdobeScript() {
- return (
+ return env.ADOBE_SCRIPT_SRC ? (
<>
-
+
>
- )
+ ) : null
}
diff --git a/env/server.ts b/env/server.ts
index c6c658b80..72f166c6c 100644
--- a/env/server.ts
+++ b/env/server.ts
@@ -12,6 +12,7 @@ export const env = createEnv({
NODE_ENV: z.enum(["development", "test", "production"]),
PRINT_QUERY: z.boolean().default(false),
REVALIDATE_SECRET: z.string(),
+ ADOBE_SCRIPT_SRC: z.string().optional(),
},
emptyStringAsUndefined: true,
runtimeEnv: {
@@ -24,5 +25,6 @@ export const env = createEnv({
NODE_ENV: process.env.NODE_ENV,
PRINT_QUERY: process.env.PRINT_QUERY,
REVALIDATE_SECRET: process.env.REVALIDATE_SECRET,
+ ADOBE_SCRIPT_SRC: process.env.ADOBE_SCRIPT_SRC,
},
})