Skip to content

Commit 364c56b

Browse files
authored
Merge pull request #55 from carbonplan/Shane98c/plausible
add plausible
2 parents 1f44ed0 + 4ac1ecf commit 364c56b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pages/_app.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react'
12
import { ThemeProvider } from 'theme-ui'
23
import { MDXProvider } from '@mdx-js/react'
34
import '@carbonplan/components/fonts.css'
@@ -8,6 +9,14 @@ import theme from '@carbonplan/theme'
89
const App = ({ Component, pageProps }) => {
910
return (
1011
<ThemeProvider theme={theme}>
12+
{process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' && (
13+
<Script
14+
strategy='lazyOnload'
15+
data-domain='carbonplan.org'
16+
data-api='https://carbonplan.org/proxy/api/event'
17+
src='https://carbonplan.org/js/script.file-downloads.outbound-links.js'
18+
/>
19+
)}
1120
<MDXProvider>
1221
<Component {...pageProps} />
1322
</MDXProvider>

0 commit comments

Comments
 (0)