NextJS
Steps to Add Script to a Next.js Project
import Head from 'next/head';// _app.js
import Head from 'next/head';
import '../styles/globals.css';
function MyApp({ Component, pageProps }) {
return (
<>
<Head>
<script>
{`
// Your sitebehaviour tracking script here
`}
</script>
</Head>
<Component {...pageProps} />
</>
);
}
export default MyApp;
Last updated