feat: 添加 Google Analytics 代码。
This commit is contained in:
parent
0934ee746a
commit
6738d0f516
@ -23,6 +23,17 @@ function MyApp({ Component, pageProps }) {
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<Head>
|
||||
<title>Ivan‘s Blog</title>
|
||||
<script
|
||||
async
|
||||
src="https://www.googletagmanager.com/gtag/js?id=UA-120892498-1"
|
||||
></script>
|
||||
{`<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-120892498-1');
|
||||
</script>`}
|
||||
</Head>
|
||||
<ThemeProvider>
|
||||
<div className={styles.page}>
|
||||
|
Loading…
Reference in New Issue
Block a user