Skip to content

Commit

Permalink
feat(KUI-1306): remove client side application insights
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Andin authored and karlandindrakryggen committed May 13, 2024
1 parent 112eb25 commit 88f76f9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
5 changes: 0 additions & 5 deletions config/serverSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,4 @@ module.exports = {
toolbar: {
url: getEnv('TOOLBAR_URL', devDefaults('https://www-r.referens.sys.kth.se/social/toolbar/widget.js')),
},

// APPLICATION INSIGHTS IN AZURE
appInsights: {
instrumentationKey: getEnv('APPINSIGHTS_INSTRUMENTATIONKEY', ''),
},
}
3 changes: 0 additions & 3 deletions server/controllers/memoCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ async function getContent(req, res, next) {
},
compressedData,
description: shortDescription,
instrumentationKey: serverConfig.appInsights.instrumentationKey,
html: view,
lang: responseLanguage,
toolbarUrl: serverConfig.toolbar.url,
Expand Down Expand Up @@ -390,7 +389,6 @@ async function getOldContent(req, res, next) {
compressedData,
description: shortDescription,
html: view,
instrumentationKey: serverConfig.appInsights.instrumentationKey,
lang: responseLanguage,
toolbarUrl: serverConfig.toolbar.url,
proxyPrefix,
Expand Down Expand Up @@ -475,7 +473,6 @@ async function getAboutContent(req, res, next) {
compressedData,
description: shortDescription,
html: view,
instrumentationKey: serverConfig.appInsights.instrumentationKey,
lang: responseLanguage,
klaroAnalyticsConsentCookie,
toolbarUrl: serverConfig.toolbar.url,
Expand Down
18 changes: 1 addition & 17 deletions server/views/layouts/publicLayout.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,7 @@
<script src="{{toolbarUrl}}"></script>

{{{render 'head-scripts'}}}
{{#if instrumentationKey}}
{{#if klaroAnalyticsConsentCookie}}
<script type="text/javascript">
var appInsights = window.appInsights || function (a) {
function b(a) {
c[a] = function () {
var b = arguments;
c.queue.push(function () { c[a].apply(c, b) })
}
} var c = { config: a }, d = document, e = window; setTimeout(function () {
var b = d.createElement("script"); b.src = a.url || "https://az416426.vo.msecnd.net/scripts/a/ai.0.js", d.getElementsByTagName("script")[0].parentNode.appendChild(b)
}); try { c.cookie = d.cookie } catch (a) { } c.queue = []; for (var f = ["Event", "Exception", "Metric", "PageView", "Trace", "Dependency"]; f.length;)b("track" + f.pop()); if (b("setAuthenticatedUserContext"), b("clearAuthenticatedUserContext"), b("startTrackEvent"), b("stopTrackEvent"), b("startTrackPage"), b("stopTrackPage"), b("flush"), !a.disableExceptionTracking) { f = "onerror", b("_" + f); var g = e[f]; e[f] = function (a, b, d, e, h) { var i = g && g(a, b, d, e, h); return !0 !== i && c["_" + f](a, b, d, e, h), i } } return c
}({ instrumentationKey: "{{{instrumentationKey}}}" }); window.appInsights = appInsights, appInsights.queue && 0 === appInsights.queue.length && appInsights.trackPageView();
</script>
{{/if}}
{{/if}}


{{#if blocks.matomoAnalytics}}
<!-- analytics start -->
{{{blocks.matomoAnalytics}}}
Expand Down

0 comments on commit 88f76f9

Please sign in to comment.