mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
feat: added google anaylatics and adsense
This commit is contained in:
parent
9ec40a4bd2
commit
eca815c560
40
pages/_document.tsx
Normal file
40
pages/_document.tsx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import Document, { DocumentContext, Html, Head, Main, NextScript } from 'next/document'
|
||||||
|
|
||||||
|
class MyDocument extends Document {
|
||||||
|
static async getInitialProps(ctx: DocumentContext) {
|
||||||
|
const initialProps = await Document.getInitialProps(ctx)
|
||||||
|
|
||||||
|
return initialProps
|
||||||
|
}
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<Html>
|
||||||
|
<Head>
|
||||||
|
<script
|
||||||
|
data-ad-client="ca-pub-4856582423981759"
|
||||||
|
async
|
||||||
|
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
|
||||||
|
></script>
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-165454387-1"></script>
|
||||||
|
<script
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: `
|
||||||
|
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'UA-165454387-1');`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Head>
|
||||||
|
<body className="text-black dark:text-gray-100 dark:bg-discord-dark bg-white">
|
||||||
|
<Main />
|
||||||
|
<NextScript />
|
||||||
|
</body>
|
||||||
|
</Html>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default MyDocument
|
||||||
Loading…
x
Reference in New Issue
Block a user