Skip to content

Commit 458d2d8

Browse files
feat(orga): updating matomo config
1 parent e65a74f commit 458d2d8

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

orga/app/routes/application.js

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ export default class ApplicationRoute extends Route {
77
@service currentUser;
88
@service session;
99
@service intl;
10+
@service metrics;
1011

1112
async beforeModel(transition) {
13+
this.metrics.initialize();
1214
await this.session.setup();
1315
await this.featureToggles.load();
1416
const isFranceDomain = this.currentDomain.isFranceDomain;

orga/config/environment.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ module.exports = function (environment) {
105105
warnIfNoIconsIncluded: false,
106106
},
107107

108-
matomo: {},
109-
110108
'ember-cli-notifications': {
111109
autoClear: true,
112110
clearDuration: 5000,
@@ -120,6 +118,11 @@ module.exports = function (environment) {
120118
'ember-cli-mirage': {
121119
usingProxy: true,
122120
},
121+
122+
metrics: {
123+
enabled: analyticsEnabled,
124+
matomoUrl: process.env.WEB_ANALYTICS_URL,
125+
},
123126
};
124127

125128
if (environment === 'development') {
@@ -132,10 +135,6 @@ module.exports = function (environment) {
132135
// ENV.APP.LOG_TRANSITIONS = true;
133136
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
134137
// ENV.APP.LOG_VIEW_LOOKUPS = true;
135-
if (analyticsEnabled) {
136-
ENV.matomo.url = process.env.WEB_ANALYTICS_URL;
137-
ENV.matomo.debug = true;
138-
}
139138
}
140139

141140
if (environment === 'test') {
@@ -157,16 +156,12 @@ module.exports = function (environment) {
157156
autoClear: null,
158157
clearDuration: null,
159158
};
160-
159+
ENV.metrics.enabled = false;
161160
ENV.pagination.debounce = 0;
162161
}
163162

164163
if (environment === 'production') {
165164
// here you can enable a production-specific feature
166-
167-
if (analyticsEnabled) {
168-
ENV.matomo.url = process.env.WEB_ANALYTICS_URL;
169-
}
170165
}
171166

172167
return ENV;

orga/package-lock.json

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

orga/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
},
5353
"devDependencies": {
5454
"@1024pix/ember-cli-notifications": "^8.0.2",
55+
"@1024pix/ember-matomo-tag-manager": "^2.4.3",
5556
"@1024pix/ember-testing-library": "^3.0.6",
5657
"@1024pix/eslint-config": "^1.3.8",
5758
"@1024pix/pix-ui": "^48.7.1",
@@ -80,7 +81,6 @@
8081
"ember-cli-dependency-checker": "^3.3.2",
8182
"ember-cli-htmlbars": "^6.3.0",
8283
"ember-cli-inject-live-reload": "^2.1.0",
83-
"ember-cli-matomo-tag-manager": "^1.3.1",
8484
"ember-cli-mirage": "^3.0.4",
8585
"ember-cli-sass": "^11.0.1",
8686
"ember-click-outside": "^6.1.1",

0 commit comments

Comments
 (0)