diff --git a/studio/.env.local.example b/studio/.env.local.example index c3d0643eba..9c078fa561 100644 --- a/studio/.env.local.example +++ b/studio/.env.local.example @@ -18,8 +18,9 @@ NEXT_PUBLIC_SENTRY_CLIENT_REPLAYS_SESSION_SAMPLE_RATE= NEXT_PUBLIC_SENTRY_EDGE_SAMPLE_RATE= # analytics config +NEXT_PUBLIC_OSANO_SCRIPT_ID= NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID= -NEXT_PUBLIC_LINKEDIN_INSIGHT_ID= +NEXT_PUBLIC_ACTIVE_CAMPAIGN_ACCOUNT= # used by https://docs.sentry.io/platforms/javascript/guides/nextjs/ # enable this during build to enable sentry support for custom images diff --git a/studio/src/components/layout/analytics/active-campaign-script.tsx b/studio/src/components/layout/analytics/active-campaign-script.tsx new file mode 100644 index 0000000000..92da8e2018 --- /dev/null +++ b/studio/src/components/layout/analytics/active-campaign-script.tsx @@ -0,0 +1,60 @@ +import Script from "next/script"; + +const ACTIVE_CAMPAIGN_SCRIPT_SRC = 'https://diffuser-cdn.app-us1.com/diffuser/diffuser.js'; + +export function ActiveCampaignScript() { + const acAccount = process.env.NEXT_PUBLIC_ACTIVE_CAMPAIGN_ACCOUNT; + if (!acAccount || process.env.NODE_ENV !== 'production') { + return null; + } + + return ( + + ); +} \ No newline at end of file diff --git a/studio/src/components/layout/analytics/gtm-script.tsx b/studio/src/components/layout/analytics/gtm-script.tsx new file mode 100644 index 0000000000..23fb73b72f --- /dev/null +++ b/studio/src/components/layout/analytics/gtm-script.tsx @@ -0,0 +1,69 @@ +import Script from "next/script"; + +export function GtmScript() { + const gtmId = process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID; + + return ( + <> + + + + + ); +} + +export function GtmNoScript() { + const gtmId = process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID; + if (!gtmId || process.env.NODE_ENV !== 'production') { + return null; + } + + return ( +