diff --git a/config/config.js b/config/config.js index 8d5c576bd208e2f30bbea5bc10bb9a4a162ae261..b43bba3ee8e91f8b1c6e5eb73b2430d9e242d1b5 100644 --- a/config/config.js +++ b/config/config.js @@ -40,7 +40,7 @@ export default { 'umi-plugin-ga', { code: 'UA-72788897-6', - judge: () => window.location.hostname === 'preview.pro.ant.design', + judge: () => process.env.APP_TYPE === 'site', }, ], ], diff --git a/package.json b/package.json index 6fb083d541043d64705ca63e18dc233b7596cb14..784610a759f642209214a599a3c5370df841b95f 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "stylelint-config-standard": "^18.0.0", "umi": "^2.1.1", "umi-plugin-react": "^1.1.1", - "umi-plugin-ga": "^1.1.1" + "umi-plugin-ga": "^1.1.2" }, "optionalDependencies": { "puppeteer": "^1.9.0"