1.1.6 • Published 7 months ago

ngx-applications-insights v1.1.6

Weekly downloads
-
License
The Unlicense
Repository
github
Last release
7 months ago

Angular Azure Insights

This is a basic angular wrapper implementation for the ApplicationInsights-JS package.

Getting started

a) Make sure you install ApplicationInsights-JS package

npm i @microsoft/applicationinsights-web

b) Install this package

npm i ngx-applications-insights

c) Import NgxApplicationInsightsModule to you app.module imports section

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    NgxApplicationInsightsModule.forRoot({
      enableAutoRouteTracking: true, // enable route navigation tracking, the default valuefor this is false.
      instrumentationKey: 'Your Instrumentation Key From Azure here',
    }),
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
  1. Inject NgxApplicationInsightsService to user component / service etc.
import { Component, OnInit } from '@angular/core';
import { NgxApplicationInsightsService } from 'ngx-applications-insights';

@Component({
  selector: 'app-example',
  templateUrl: './test-a.component.html',
  styleUrls: ['./test-a.component.scss'],
})
export class ExampleComponent implements OnInit {
  constructor(private insights: NgxApplicationInsightsService) {}

  ngOnInit(): void {
   console.log('Called track event');
    this.insights.trackEvent({
      name: 'Test event a',
      properties: { A: 12 },
    });
  }
}
1.1.6

7 months ago

1.1.5

1 year ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago