Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // omitting other imports for brevity...
  2. import {AppInsights} from "applicationinsights-js";
  3.  
  4. export default class AppInsightsCustomizerApplicationCustomizer
  5. extends BaseApplicationCustomizer<IAppInsightsCustomizerApplicationCustomizerProperties> {
  6.  
  7. @override
  8. public onInit(): Promise<void> {
  9. let appInsightsKey: string = "/* update with YOUR App Insights key: */";
  10. AppInsights.downloadAndSetup({ instrumentationKey: appInsightsKey });
  11.  
  12. // simple usage - all params will be derived..
  13. AppInsights.trackPageView();
  14.  
  15. return Promise.resolve<void>();
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement