How to use Angulartics2 with ApplicationInsights

152 views Asked by At

We setup applicationinsights as explain official doc. We setup applicationInsights in app.component.ts constructor.

We want to user Angulartics2 to managed google analitycs and applicationinsights.

However, Angulartics2 needs appInsights to be global. By declaring appInsights inside of the constructor of app.component.ts, appInsights is not global.

if we setup window['appInsights'] = new ApplicationInsights(....), everything works as expected. What is the correct way to use application insight with angulartics2. Doc page is not very useful.

0

There are 0 answers