Skip to content

Commit

Permalink
Implement analytics.mit.edu
Browse files Browse the repository at this point in the history
  • Loading branch information
suufi committed Jan 29, 2025
1 parent f8bd753 commit e418ed2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ function App ({ pageProps, Component }: AppProps) {
const { colorScheme, toggleColorScheme } = useMantineColorScheme()
const theme = useMantineTheme()
const isMounted = useMounted()
const isBrowser = typeof window !== 'undefined'

return (
<>
Expand Down Expand Up @@ -326,6 +327,9 @@ export default function AppWrapper ({ Component, pageProps }: AppProps) {
<link id="theme-link" rel="stylesheet" href="css/themes/lara-dark-blue/theme.css" />
<link id="theme-link" rel="stylesheet" href="css/themes/lara-light-blue/theme.css" />

{process.browser && <script defer data-domain="opengrades.mit.edu" src="https://analytics.mit.edu/js/script.outbound-links.js"></script>}
{process.browser && <script>window.plausible = window.plausible || function() {(window.plausible.q = window.plausible.q || []).push(arguments)}</script>}


<ColorSchemeScript defaultColorScheme='auto' />
</Head>
Expand Down

0 comments on commit e418ed2

Please sign in to comment.