引入React-cusdis

This commit is contained in:
tangly1024
2022-02-18 11:06:58 +08:00
parent 342c42f42d
commit d8c6888920
4 changed files with 24 additions and 49 deletions

View File

@@ -85,12 +85,12 @@ const CommonScript = () => {
{/* 谷歌统计 */}
{BLOG.ANALYTICS_GOOGLE_ID && (<>
<script async
src={`https://www.googletagmanager.com/gtag/js?id=${BLOG.ANALYTICS_GOOGLE_ID}`}
/>
<script async
dangerouslySetInnerHTML={{
__html: `
<script async
src={`https://www.googletagmanager.com/gtag/js?id=${BLOG.ANALYTICS_GOOGLE_ID}`}
/>
<script async
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
@@ -98,9 +98,9 @@ const CommonScript = () => {
page_path: window.location.pathname,
});
`
}}
/>
</>)}
}}
/>
</>)}
</>)
}