AngularFireAnalytics 不会在 DebugView 中记录事件
AngularFireAnalytics doesn't log events in DebugView
我已经按照说明操作了install-and-setup.md and getting-startd.md, set DEBUG_MODE to true, install google-analytics-debugger extension but anyway can't see any events in DebugView. In development tools there aren't any POST requests to analytics, only some GET to https://www.googletagmanager.com/gtag/js?l=dataLayer&dbg=7986
存储库:Repository
我也试过在 index.html 中添加 SDK。 DebugView 日志记录有效,POST 请求 https://www.google-analytics.com/g/collect..。存在。
package.json
"@angular/core": "~10.0.14",
"@angular/fire": "^6.0.2",
"firebase": "^7.13.1"
app.module.ts
import { AngularFireAnalyticsModule, DEBUG_MODE } from '@angular/fire/analytics';
import { AngularFireModule } from '@angular/fire';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ProfileComponent } from './profile/profile.component';
import { RulesComponent } from './rules/rules.component';
import { environment } from '../environments/environment';
@NgModule({
declarations: [
AppComponent,
ProfileComponent,
RulesComponent
],
imports: [
AngularFireModule.initializeApp(environment.firebase),
AngularFireAnalyticsModule,
BrowserModule,
AppRoutingModule,
],
providers: [
{ provide: DEBUG_MODE, useValue: true },
],
bootstrap: [AppComponent]
})
export class AppModule { }
提前致谢。
似乎是 Angular Fire 的一个已知问题,您可以尝试使用 @angular/fire ^6.0.0
,正如此处评论中提到的:https://github.com/angular/angularfire/issues/2505#issuecomment-672462375
我已经按照说明操作了install-and-setup.md and getting-startd.md, set DEBUG_MODE to true, install google-analytics-debugger extension but anyway can't see any events in DebugView. In development tools there aren't any POST requests to analytics, only some GET to https://www.googletagmanager.com/gtag/js?l=dataLayer&dbg=7986
存储库:Repository
我也试过在 index.html 中添加 SDK。 DebugView 日志记录有效,POST 请求 https://www.google-analytics.com/g/collect..。存在。
package.json
"@angular/core": "~10.0.14",
"@angular/fire": "^6.0.2",
"firebase": "^7.13.1"
app.module.ts
import { AngularFireAnalyticsModule, DEBUG_MODE } from '@angular/fire/analytics';
import { AngularFireModule } from '@angular/fire';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ProfileComponent } from './profile/profile.component';
import { RulesComponent } from './rules/rules.component';
import { environment } from '../environments/environment';
@NgModule({
declarations: [
AppComponent,
ProfileComponent,
RulesComponent
],
imports: [
AngularFireModule.initializeApp(environment.firebase),
AngularFireAnalyticsModule,
BrowserModule,
AppRoutingModule,
],
providers: [
{ provide: DEBUG_MODE, useValue: true },
],
bootstrap: [AppComponent]
})
export class AppModule { }
提前致谢。
似乎是 Angular Fire 的一个已知问题,您可以尝试使用 @angular/fire ^6.0.0
,正如此处评论中提到的:https://github.com/angular/angularfire/issues/2505#issuecomment-672462375