diff --git a/deploy/likedao/templates/react-app.config.yaml b/deploy/likedao/templates/react-app.config.yaml index 1d06789f..b31e7e8a 100644 --- a/deploy/likedao/templates/react-app.config.yaml +++ b/deploy/likedao/templates/react-app.config.yaml @@ -35,6 +35,11 @@ data: endpoint: {{ .Values.reactApp.graphqlEndpoint | quote }}, }, authEndpoint: {{ .Values.reactApp.authEndpoint | quote }}, + {{ if .Values.reactApp.googleAnalyticsId }} + googleAnalyticsId: {{ .Values.reactApp.googleAnalyticsId | quote }}, + {{ else }} + googleAnalyticsId: null, + {{ end }} chainLinks: [ {{- range .Values.reactApp.chainLinks }} {{- with .}} diff --git a/react-app/config/config.template.js b/react-app/config/config.template.js index 099831e6..d8e194eb 100644 --- a/react-app/config/config.template.js +++ b/react-app/config/config.template.js @@ -22,6 +22,7 @@ window.appConfig = { endpoint: "http://localhost:8080/graphql", }, authEndpoint: "http://localhost:8080/auth", + googleAnalyticsId: null, chainLinks: [], footerLinks: { githubLink: "https://github.com/likecoin/likedao", diff --git a/react-app/src/config/Config.ts b/react-app/src/config/Config.ts index 2759f02a..4440ed3e 100644 --- a/react-app/src/config/Config.ts +++ b/react-app/src/config/Config.ts @@ -45,6 +45,7 @@ export interface IConfig { endpoint: string; }; authEndpoint: string; + googleAnalyticsId: string | null; chainLinks: ChainLink[]; footerLinks: FooterLinks; } @@ -74,6 +75,7 @@ const defaultConfig: IConfig = { }, authEndpoint: "http://localhost:8080/auth", chainLinks: [], + googleAnalyticsId: null, footerLinks: { githubLink: "https://github.com/likecoin/likedao", tokenLinks: [