Skip to content

Commit

Permalink
CP-279: add baidu tongji script to the tidb.io Head component (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
cw1997 authored Nov 5, 2021
1 parent 5652aed commit 6873f57
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/head/Head.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ const Head = ({ creator, description, faviconPathname, googleAnalyticsId, keywor
`,
}}
/>

<script
dangerouslySetInnerHTML={{
__html: `
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?2321846dd5ff3a4f0ffeef2e2a25e218";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`,
}}
/>

{children}
</NextHead>
);
Expand Down

1 comment on commit 6873f57

@vercel
Copy link

@vercel vercel bot commented on 6873f57 Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.