mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
chore: add ga & hotjar (#38591)
* chore: add ga & horjar * chore: code clean
This commit is contained in:
parent
75a38c5805
commit
e9ab28d4a8
24
.dumirc.ts
24
.dumirc.ts
@ -34,6 +34,10 @@ export default defineConfig({
|
|||||||
extraRehypePlugins: [rehypeAntd],
|
extraRehypePlugins: [rehypeAntd],
|
||||||
extraBabelPresets: ['@emotion/babel-preset-css-prop'],
|
extraBabelPresets: ['@emotion/babel-preset-css-prop'],
|
||||||
mfsu: false,
|
mfsu: false,
|
||||||
|
metas: [{ name: 'theme-color', content: '#1677ff' }],
|
||||||
|
analytics: {
|
||||||
|
ga_v2: 'UA-72788897-1',
|
||||||
|
},
|
||||||
headScripts: [
|
headScripts: [
|
||||||
`
|
`
|
||||||
(function () {
|
(function () {
|
||||||
@ -91,5 +95,25 @@ export default defineConfig({
|
|||||||
document.documentElement.className += isZhCN(pathname) ? 'zh-cn' : 'en-us';
|
document.documentElement.className += isZhCN(pathname) ? 'zh-cn' : 'en-us';
|
||||||
})();
|
})();
|
||||||
`,
|
`,
|
||||||
|
// Hotjar Tracking Code for ant.design
|
||||||
|
`
|
||||||
|
(function (h, o, t, j, a, r) {
|
||||||
|
if (location.hostname === 'localhost') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
h.hj =
|
||||||
|
h.hj ||
|
||||||
|
function () {
|
||||||
|
(h.hj.q = h.hj.q || []).push(arguments);
|
||||||
|
};
|
||||||
|
h._hjSettings = { hjid: 473408, hjsv: 5 };
|
||||||
|
a = o.getElementsByTagName('head')[0];
|
||||||
|
r = o.createElement('script');
|
||||||
|
r.async = 1;
|
||||||
|
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
|
||||||
|
a.appendChild(r);
|
||||||
|
})(window, document, '//static.hotjar.com/c/hotjar-', '.js?sv=');
|
||||||
|
`,
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user