File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,22 @@ export default function Layout({ children }: { children: ReactNode }) {
2222 return (
2323 < html lang = "en" className = { inter . className } suppressHydrationWarning >
2424 < body className = "flex flex-col min-h-screen" >
25- < Script
26- defer
27- data-domain = { process . env . NEXT_PUBLIC_ANALYTICS_DOMAIN }
28- src = { process . env . NEXT_PUBLIC_ANALYTICS_URL }
29- id = "plausible-script"
30- />
31- < Script
32- dangerouslySetInnerHTML = { {
33- __html : `window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }` ,
34- } }
35- id = "plausible-window"
36- />
25+ { process . env . NEXT_PUBLIC_ANALYTICS_DOMAIN && process . env . NEXT_PUBLIC_ANALYTICS_URL && (
26+ < >
27+ < Script
28+ defer
29+ data-domain = { process . env . NEXT_PUBLIC_ANALYTICS_DOMAIN }
30+ src = { process . env . NEXT_PUBLIC_ANALYTICS_URL }
31+ id = "plausible-script"
32+ />
33+ < Script
34+ dangerouslySetInnerHTML = { {
35+ __html : `window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }` ,
36+ } }
37+ id = "plausible-window"
38+ />
39+ </ >
40+ ) }
3741 < RootProvider > { children } </ RootProvider >
3842 </ body >
3943 </ html >
You can’t perform that action at this time.
0 commit comments