Integrating firebase analytics into ionic2 application


#1

Ive been creating a ionic2 application that uses cordova-plugin-firebase for use in firebase analytics.

Im using the following functions in my ionPageLoaded()

Track Page Views

 window.FirebasePlugin.logEvent("page_view", {page: "Event List"});

Track Action

 window.FirebasePlugin.logEvent("volunteer_action", {action: "donate"});`

However, my analytics are not being updated in firebase, i.e my analytics tab is empty.

How do I make sure that page views and actions are tracked in Firebase Analytics?


#2

@thededlier got it working ?
If yes , can you please share steps to achieve this ?


#3

Could you do it? I need to do the same, I would be very grateful if you could help me a little. Something short to know where to start.


#4

@thededlier

Did you manage to get cordova-plugin-firebase working to log Analytics?

If so, can you explain how to set it up?

Thanks!

Leo


#5

Managed to get this working? I am trying it like this but no results:

if (window.FirebasePlugin) window.FirebasePlugin.logEvent("page_view", {page: "login"});