From ebc2342371f06c476113d79f97080d39be1b044a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Tue, 9 Oct 2018 15:19:29 +0800 Subject: [PATCH] add ga when deploying site --- config/config.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.js b/config/config.js index 8d5c576b..b43bba3e 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 6fb083d5..784610a7 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" -- GitLab