Skip to content

Commit

Permalink
Asset build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Nov 29, 2024
1 parent ea82c6c commit 7707a1a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 40 deletions.

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

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 7707a1a

Please sign in to comment.