Skip to content

Commit 1053d0d

Browse files
committed
fix: revert wrong code for client appinsights with hardcoded key
1 parent 49d63ac commit 1053d0d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/appinsights.client.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { setupVueErrorHandling, setupPageTracking } from './appinsights-vue'
33
import Vue from 'vue'
44

55
export default function (ctx, inject) {
6-
const config = {"instrumentationKey":"12345678-def7-4b3f-bb63-03dcc962af89"}
6+
const config = <%= serialize(options.config) %>
77
// runtimeConfig
88
const runtimeConfig = ctx.$config && ctx.$config.appInsights || {}
99

@@ -15,8 +15,13 @@ export default function (ctx, inject) {
1515

1616
// Initialize appInsights
1717

18+
<% if (options.initialize) { %>// Initialize appInsights
19+
1820
appInsights.loadAppInsights()
1921
setupVueErrorHandling(Vue, appInsights)
20-
22+
<% if (options.trackPageView) { %>
2123
setupPageTracking(ctx.app.router, appInsights)
24+
<% } %>
25+
26+
<% } %>
2227
}

0 commit comments

Comments
 (0)