From 14e1d4b52abf2dd3f8d32f2fcae7a1dad622c904 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Wed, 1 Jul 2020 07:42:28 +0900 Subject: [PATCH] Make google-analytics configurable, fix #790 --- README.md | 6 ++++++ docker-compose.prod.yml | 2 ++ frontend/nuxt.config.js | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 33e6043a..825477dc 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,12 @@ ADMIN_USERNAME: "admin" ADMIN_PASSWORD: "password" ``` +If you use Google Analytics, set the tracking: + +```yml +GOOGLE_TRACKING_ID: "UA-12345678-1" +``` + Run doccano: ```bash diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 5e7310ac..63bb2f3c 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -23,6 +23,8 @@ services: build: ./frontend volumes: - www:/app/dist + environment: + GOOGLE_TRACKING_ID: "" nginx: build: ./nginx diff --git a/frontend/nuxt.config.js b/frontend/nuxt.config.js index d20b8393..0eec36e7 100644 --- a/frontend/nuxt.config.js +++ b/frontend/nuxt.config.js @@ -63,7 +63,7 @@ export default { buildModules: [ ['@nuxtjs/google-analytics', { - id: 'UA-125643874-2' + id: process.env.GOOGLE_TRACKING_ID }] ], /*