Commit bad23821 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Optional GUI user tracking, disabled by default.

parent 73e7997a
......@@ -68,6 +68,7 @@ The first production version of nomad@fairdi as the upload API and gui for NOMAD
- reprocessing of published results (e.g. after parser/normalizer improvements)
- mirror functionality
- refactored command line interface (CLI)
- potential GUI user tracking capabilities
- many minor bugfixes
### v0.4.7
......
......@@ -9,7 +9,10 @@ window.nomadEnv = window.nomadEnv || {}
export const apiBase = window.nomadEnv.apiBase
export const appBase = process.env.PUBLIC_URL
export const kibanaBase = window.nomadEnv.kibanaBase
export const matomoUrl = window.nomadEnv.matomoUrl
export const matomoSiteId = window.nomadEnv.matomoSiteId
export const debug = window.nomadEnv.debug || false
export const sendTrackingData = window.nomadEnv.sendTrackingData
export const repoPrimaryColor = repo
......
......@@ -8,17 +8,15 @@ import registerServiceWorker from './registerServiceWorker'
import { Router } from 'react-router-dom'
import history from './history'
import PiwikReactRouter from 'piwik-react-router'
import { debug } from './config'
import { sendTrackingData, matomoUrl, matomoSiteId } from './config'
const matomo = PiwikReactRouter({
url: 'https://labdev-nomad.esc.rzg.mpg.de/fairdi/matomo/',
siteId: 1
url: matomoUrl,
siteId: matomoSiteId
})
console.log(debug)
ReactDOM.render(
<Router history={debug ? history : matomo.connectToHistory(history)}>
<Router history={sendTrackingData ? matomo.connectToHistory(history) : history}>
<App />
</Router>, document.getElementById('root'))
registerServiceWorker()
......@@ -28,6 +28,9 @@ data:
window.nomadEnv = {
"apiBase": "{{ .Values.proxy.external.path }}/api",
"kibanaBase": "{{ .Values.proxy.external.kibanaPath }}",
"matomoSiteId": {{ .Values.gui.matomoSiteId }},
"matomoUrl": {{ .Values.gui.matomoUrl }},
"sendTrackingData": {{ .Values.gui.sendTrackingData }},
"debug": {{ .Values.gui.debug }}
};
---
......
......@@ -63,6 +63,12 @@ gui:
port: 8080
## This variable is used in the GUI to show or hide additional information
debug: false
## URL for matomo(piwik) user tracking
matomoUrl: 'http://nowhere.no',
## site id for matomo(piwik) user tracking
matomoSiteId: 1,
## send matomo(piwik) user tracking data
sendTrackingData: false
## Everything concerning the proxy that combined gui, api, kibana
# It is run via NodePort service
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment