diff --git a/src/config/matomo.js b/src/config/matomo.js new file mode 100644 index 00000000..b34eb0a8 --- /dev/null +++ b/src/config/matomo.js @@ -0,0 +1,6 @@ +const matomo = { + matomoHost: "MATOMO_HOST_PLACEHOLDER", + matomoId: "MATOMO_SITE_ID_PLACEHOLDER" +} + +export default matomo \ No newline at end of file diff --git a/src/main.js b/src/main.js index 168b3e95..41450920 100644 --- a/src/main.js +++ b/src/main.js @@ -11,28 +11,16 @@ import "bootstrap/dist/css/bootstrap.css" import "bootstrap-vue-next/dist/bootstrap-vue-next.css" import "bootstrap" import "bootstrap-icons/font/bootstrap-icons.css" +import matomo from "./config/matomo.js" library.add(faSpinner) library.add(faPencil) library.add(faTrash) library.add(faDownload) -let matomoHost = '' -let matomoSiteId = 0 -if(window.location.origin === 'http://localhost:8080') { - matomoHost = 'https://matomo.bbmri-eric.eu/' - matomoSiteId = 1 -}else if(window.location.origin === 'https://negotiator.acc.bbmri-eric.eu') { - matomoHost = 'https://negotiator.acc.bbmri-eric.eu' - matomoSiteId = 2 -}else if(window.location.origin === 'https://negotiator.bbmri-eric.eu') { - matomoHost = 'https://negotiator.bbmri-eric.eu' - matomoSiteId = 3 -} - const app = createApp(App).use(VueMatomo, { - host: matomoHost, - siteId: matomoSiteId, + host: matomo.matomoHost, + siteId: matomo.matomoId, }) app.use(router) diff --git a/start.sh b/start.sh index 74c49eb6..9b192dab 100755 --- a/start.sh +++ b/start.sh @@ -10,6 +10,8 @@ do sed -i 's|REDIRECT_URI_PLACEHOLDER|'${REDIRECT_URI}'|g' $file sed -i 's|LOGOUT_URI_PLACEHOLDER|'${LOGOUT_URI}'|g' $file sed -i 's|RESOURCES_PLACEHOLDER|'${API_RESOURCES}'|g' $file + sed -i 's|MATOMO_HOST_PLACEHOLDER|'${MATOMO_HOST}'|g' $file + sed -i 's|MATOMO_SITE_ID_PLACEHOLDER|'${MATOMO_SITE_ID}'|g' $file done