Firebase Analytics

Contents

Cordova plugin for Firebase Analytics

https://github.com/chemerisuk/cordova-plugin-firebase-analytics

Ionic Firebase Analytics插件的安装(Installation)

ionic cordova plugin add cordova-plugin-firebase-analytics npm install @ionic-native/firebase-analytics

Ionic Firebase Analytics插件支持的平台(Supported Platforms)

  • Android
  • iOS

Ionic Firebase Analytics插件的用法(Usage)

import { FirebaseAnalytics } from '@ionic-native/firebase-analytics';


constructor(private firebaseAnalytics: FirebaseAnalytics) { }

...

this.firebaseAnalytics.logEvent('page_view', {page: "dashboard"})
  .then((res: any) => console.log(res))
  .catch((error: any) => console.error(error));