config: add MATOMO_HOST environment variable
This commit is contained in:
parent
cd7a86743b
commit
d4fada9f6c
4 changed files with 10 additions and 9 deletions
|
@ -276,8 +276,9 @@ class ApplicationController < ActionController::Base
|
||||||
matomo = Rails.application.secrets.matomo
|
matomo = Rails.application.secrets.matomo
|
||||||
|
|
||||||
{
|
{
|
||||||
key: matomo[:client_key],
|
enabled: matomo[:enabled],
|
||||||
enabled: matomo[:enabled]
|
host: matomo[:host],
|
||||||
|
key: matomo[:client_key]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
const { key, enabled } = gon.matomo || {};
|
const { enabled, host, key } = gon.matomo || {};
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
window._paq = window._paq || [];
|
window._paq = window._paq || [];
|
||||||
|
|
||||||
const url = '//stats.data.gouv.fr/';
|
const jsUrl = `//${host}/piwik.js`;
|
||||||
const trackerUrl = `${url}piwik.php`;
|
const trackerUrl = `//${host}/piwik.php`;
|
||||||
const jsUrl = `${url}piwik.js`;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Configure Matomo analytics
|
// Configure Matomo analytics
|
||||||
|
|
|
@ -67,8 +67,8 @@ SENTRY_DSN_JS=""
|
||||||
|
|
||||||
# External service: Matomo web analytics
|
# External service: Matomo web analytics
|
||||||
MATOMO_ENABLED="disabled"
|
MATOMO_ENABLED="disabled"
|
||||||
MATOMO_ID="73"
|
MATOMO_ID=""
|
||||||
# Missing MATOMO_HOST (thus hardcoded)
|
MATOMO_HOST="matomo.organisme.fr"
|
||||||
|
|
||||||
# SMTP Provider: Send In Blue
|
# SMTP Provider: Send In Blue
|
||||||
SENDINBLUE_ENABLED="disabled"
|
SENDINBLUE_ENABLED="disabled"
|
||||||
|
|
|
@ -55,6 +55,7 @@ defaults: &defaults
|
||||||
api_v3_key: <%= ENV['SENDINBLUE_API_V3_KEY'] %>
|
api_v3_key: <%= ENV['SENDINBLUE_API_V3_KEY'] %>
|
||||||
matomo:
|
matomo:
|
||||||
enabled: <%= ENV['MATOMO_ENABLED'] == 'enabled' %>
|
enabled: <%= ENV['MATOMO_ENABLED'] == 'enabled' %>
|
||||||
|
host: <%= ENV['MATOMO_HOST'] %>
|
||||||
client_key: <%= ENV['MATOMO_ID'] %>
|
client_key: <%= ENV['MATOMO_ID'] %>
|
||||||
sentry:
|
sentry:
|
||||||
enabled: <%= ENV['SENTRY_ENABLED'] == 'enabled' %>
|
enabled: <%= ENV['SENTRY_ENABLED'] == 'enabled' %>
|
||||||
|
|
Loading…
Reference in a new issue