diff --git a/website/src/components/VideoContent.jsx b/website/src/components/VideoContent.jsx index ef908ead83..09248e82a9 100644 --- a/website/src/components/VideoContent.jsx +++ b/website/src/components/VideoContent.jsx @@ -39,7 +39,7 @@ const LazyVideo = ({ url, title = 'YouTube video player' }) => { className={styles.thumbnailImage} src={`https://img.youtube.com/vi/${videoId}/hqdefault.jpg`} alt={`${title} thumbnail`} - fetchPriority='high' + fetchpriority='high' />
{ + // Skip Google Analytics in development + if (process.env.NODE_ENV === 'development') { + return; + } + if ( window.gtag || document.querySelector('script[src*="googletagmanager"]') @@ -33,6 +38,11 @@ export default function Root({ children }: { children: React.ReactNode }) { }; const loadGoogleTagManager = () => { + // Skip GTM in development + if (process.env.NODE_ENV === 'development') { + return; + } + if ( window.google_tag_manager || document.querySelector(