angulartics / angulartics2

Vendor-agnostic analytics for Angular2 applications.
MIT License
1.01k stars 195 forks source link

Clarify Angulartics2Module import location and debugging events with developerMode #362

Open kmturley opened 4 years ago

kmturley commented 4 years ago

I'm submitting a ...

Importing Angulartics2Module into app-routing.module.ts allows page tracking to work, but not event tracking. Moving the import to app.module.ts allows both features to work. This should be explained in the documentation as it's confusing some features work and others don't by import location.

When running Angulatics2 locally you enable developerMode but there's no way to debug that the events are being sent? Expecting that to be highlighted more in the documentation, and if developerMode is set to true, why doesn't it console.log the events for debugging?

Documentation to explain correct location app.module.ts to import Angulartics2Module, and that event tracking doesn't work if imported into app-routing.module.ts

Documentation to explain developerMode options and how to debug events locally.

Confusing to someone trying to use the library.

@angular-devkit/architect         0.803.6
@angular-devkit/build-angular     0.803.6
@angular-devkit/build-optimizer   0.803.6
@angular-devkit/build-webpack     0.803.6
@angular-devkit/core              8.3.6
@angular-devkit/schematics        8.3.6
@angular/cli                      8.3.6
@angular/pwa                      0.803.8
@angular/service-worker           8.2.9
@ngtools/webpack                  8.3.6
@schematics/angular               8.3.6
@schematics/update                0.803.6
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2
meraj-ahmed commented 4 years ago

+1 It would be very helpful if events could be logged to console for debugging.