Skip to content

Analytics: Never fired any event in Firebase Analytics/DebugView  #2545

@grenmath

Description

@grenmath

Version info

"dependencies": {
"@angular/animations": "~9.1.11",
"@angular/cdk": "^9.2.4",
"@angular/common": "~9.1.11",
"@angular/compiler": "~9.1.11",
"@angular/core": "~9.1.11",
"@angular/fire": "^6.0.2",
"@angular/forms": "~9.1.11",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "~9.1.11",
"@angular/platform-browser-dynamic": "~9.1.11",
"@angular/router": "~9.1.11",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2",
"firebase": "^7.13.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.901.10",
"@angular/cli": "~9.1.10",
"@angular/compiler-cli": "~9.1.11",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~3.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.8.3",
"@angular-devkit/architect": ">= 0.900 < 0.1100",
"firebase-tools": "^8.0.0",
"fuzzy": "^0.1.3",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"open": "^7.0.3"
}

How to reproduce these conditions

Easy , just setup AngularFire with Analytics and Firebase ProjectId (config.json)
Dont see any event in Firebase Analytics and neither in DebugView

My AppModule is like this:

`import { BrowserModule } from '@angular/platform-browser';
import { NgModule, isDevMode } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AngularFireModule } from '@angular/fire';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { environment } from '../environments/environment';

import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HeaderComponent } from './base/header/header.component';
import { FooterComponent } from './base/footer/footer.component';
import { AboutComponent } from './base/about/about.component';
import { ContactComponent } from './base/contact/contact.component';
import { HomeComponent } from './base/home/home.component';

// Material
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatIconModule } from '@angular/material/icon';
import { MatCardModule } from '@angular/material/card';
import { AdminModule } from './modules/admin/admin.module';
import { VerifyEmailComponent } from './base/verify-email/verify-email.component';
import { AngularFirestoreModule } from '@angular/fire/firestore';
import { AngularFireDatabaseModule } from '@angular/fire/database';
import {
AngularFireAnalyticsModule,
ScreenTrackingService,
DEBUG_MODE,
} from '@angular/fire/analytics';

@NgModule({
declarations: [
AppComponent,
HeaderComponent,
FooterComponent,
AboutComponent,
ContactComponent,
HomeComponent,
VerifyEmailComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
AngularFireModule.initializeApp(environment.firebase),
AngularFireAnalyticsModule,
AngularFireAuthModule,
AngularFireDatabaseModule,
AngularFirestoreModule,
MatToolbarModule,
MatIconModule,
MatCardModule,
AdminModule,
],
providers: [
ScreenTrackingService,
{ provide: DEBUG_MODE, useFactory: () => isDevMode() },
],
bootstrap: [AppComponent],
})
export class AppModule {}
`

Debug output

No errors, but i enabled Google Analytics Debugger. I received this log in console Dev Chrome tools:

Screen Shot 2020-07-18 at 11 15 47 AM

** Screenshots **

Expected behavior

received any event in Firebase Analytics and DebugView

Actual behavior

Nothing received with Fire 6.0.2 :(
Downgraded at 5.4.2 , analytics work! Updated every call with FireAuth with auth. No conflicts since downgrade.
Surprised bumped to 6 and Analytics dont work... bug regression ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions