Skip to content

Commit

Permalink
Add App Insights for web
Browse files Browse the repository at this point in the history
  • Loading branch information
Bron N Thulke committed Jun 30, 2024
1 parent 96ef422 commit 7d59a96
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 2 deletions.
172 changes: 170 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"servelocal": "npm run build && swa start dist --api api"
},
"dependencies": {
"@microsoft/applicationinsights-web": "^3.2.2",
"bootstrap": "^4.6.0",
"bootstrap-vue": "^2.21.2",
"core-js": "^3.6.4",
Expand Down
11 changes: 11 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ import '@/styles.css'

Vue.config.productionTip = false

const appInsights = new ApplicationInsights({
config: {
connectionString: "process.env.VUE_APP_APPINSIGHTS_CONNECTION_KEY"
/* …Other Configuration Options… */
}
});

appInsights.loadAppInsights();

appInsights.trackPageView();

new Vue({
render: h => h(App),
}).$mount('#app')

0 comments on commit 7d59a96

Please sign in to comment.