I have an Angular app build with AngularFire and hosted on Firebase. How should I be using Analytics SDK to set the user ID, track page loads and log custom events?
click below link to go to Google Analytics and login. after login, click Admin menu on the left bottom of the screen. click + Create Account on the left top of the screen. insert your RN(react native) app information and click Get Tracking ID on the bottom of the screen.
AngularFire is now supporting Firebase Analytics since version 5.3.0.
You can update your dependencies :
"@angular/fire": "^5.2.3",
"firebase": "^7.8.0"
As mentioned by AngularFire Docs, you just have to add AngularFireAnalyticsModule
:
import { AngularFireAnalyticsModule } from '@angular/fire/analytics';
@NgModule({
imports: [
AngularFireModule.initializeApp(environment.firebase),
AngularFireAnalyticsModule
]
})
export class AppModule { }
Be sure to add your appId
and measurementId
to your config file. (retrieve from Firebase Console, after enabling Analytics).
Support for Firebase Analytics is coming to AngularFire https://github.com/angular/angularfire/issues/2178
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With