File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import '@/styles/globals.css'
22import '../styles/pdf-experience.css'
33import type { AppProps } from 'next/app'
44import Head from 'next/head'
5+ import Script from 'next/script'
56import { SpeedInsights } from '@vercel/speed-insights/next' // 👈 新增
67import { Analytics } from "@vercel/analytics/next"
78
@@ -19,6 +20,18 @@ export default function App({ Component, pageProps }: AppProps) {
1920
2021 < script src = "//code.tidio.co/wbkzxxrbm3ym4auqw0vjdxec3csyierl.js" async > </ script >
2122
23+ < Script id = "baidu-analytics" strategy = "afterInteractive" >
24+ { `
25+ var _hmt = _hmt || [];
26+ (function() {
27+ var hm = document.createElement("script");
28+ hm.src = "https://hm.baidu.com/hm.js?f540d00118a713b3aa3454f1155ded86";
29+ var s = document.getElementsByTagName("script")[0];
30+ s.parentNode.insertBefore(hm, s);
31+ })();
32+ ` }
33+ </ Script >
34+
2235 { /* ✅ 包裹 Layout(可扩展导航、footer) */ }
2336 < Component { ...pageProps } />
2437 { /* ✅ 全局挂载 SpeedInsights */ }
You can’t perform that action at this time.
0 commit comments