diff --git a/.github/workflows/docker-build-push-cloud-web-container-on-tag.yml b/.github/workflows/docker-build-push-cloud-web-container-on-tag.yml index 6cebb4b6c..45cd5093a 100644 --- a/.github/workflows/docker-build-push-cloud-web-container-on-tag.yml +++ b/.github/workflows/docker-build-push-cloud-web-container-on-tag.yml @@ -65,6 +65,7 @@ jobs: NEXT_PUBLIC_POSTHOG_KEY=${{ secrets.POSTHOG_KEY }} NEXT_PUBLIC_POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} NEXT_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }} + NEXT_PUBLIC_GTM_ENABLED=true # needed due to weird interactions with the builds for different platforms no-cache: true labels: ${{ steps.meta.outputs.labels }} diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index 8918aa5a6..eb8d4e4d7 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -6,6 +6,7 @@ import { } from "@/components/settings/lib"; import { CUSTOM_ANALYTICS_ENABLED, + GTM_ENABLED, SERVER_SIDE_ONLY__PAID_ENTERPRISE_FEATURES_ENABLED, } from "@/lib/constants"; import { Metadata } from "next"; @@ -21,6 +22,7 @@ import { getCurrentUserSS } from "@/lib/userSS"; import CardSection from "@/components/admin/CardSection"; import { Suspense } from "react"; import PostHogPageView from "./PostHogPageView"; +import Script from "next/script"; const inter = Inter({ subsets: ["latin"], @@ -80,6 +82,22 @@ export default async function RootLayout({ }} /> )} + + {GTM_ENABLED && ( + + )}