Merge branch 'master' of github.com:datopian/portal.js into feature/i18n-next10
This commit is contained in:
commit
cbbb772d16
3
.gitignore
vendored
3
.gitignore
vendored
@ -35,4 +35,5 @@ pages/App.css
|
||||
# Monorepo packages Node Modules
|
||||
packages/portal/node_modules
|
||||
packages/create-portal-app/node_modules
|
||||
packages/portal/.next
|
||||
packages/portal/.next
|
||||
packages/portal/.env
|
||||
|
||||
34
packages/portal/pages/_document.tsx
Normal file
34
packages/portal/pages/_document.tsx
Normal file
@ -0,0 +1,34 @@
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document';
|
||||
|
||||
const GA_TRACKING_ID = 'G-NX72GYFHFS';
|
||||
export default class CustomDocument extends Document {
|
||||
render() {
|
||||
return (
|
||||
<Html>
|
||||
<Head>
|
||||
<script
|
||||
async
|
||||
src="https://www.googletagmanager.com/gtag/js?id=G-NX72GYFHFS"
|
||||
/>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '${GA_TRACKING_ID}',{
|
||||
page_path: window.location.pathname,
|
||||
});
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
</body>
|
||||
<NextScript />
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user