Skip to content

Commit

Permalink
Asset build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Sep 16, 2024
1 parent 352c787 commit 038bf0d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// App Insights frontend
import { ApplicationInsights } from '@microsoft/applicationinsights-web'

const clickPluginInstance = new Microsoft.ApplicationInsights.ClickAnalyticsPlugin();
const appInsights = new ApplicationInsights({ config: {
connectionString: window.appInsights.connectionString,
extensions: [ clickPluginInstance ],
extensionConfig: { [clickPluginInstance.identifier] : {
autoCapture : true,
dataTags: { useDefaultContentNameOrId: true }
} },
} });

appInsights.loadAppInsights();
appInsights.setAuthenticatedUserContext(window.appInsights.authenticatedUserId, null, true);
appInsights.trackPageView();
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require('path');

module.exports = {
entry: ['./src/application-insights.js', './node_modules/@microsoft/applicationinsights-web/dist/es5/applicationinsights-web.min.js'],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'application-insights.min.js',
}
};

0 comments on commit 038bf0d

Please sign in to comment.