B4A Library FirebaseAnalytics

This library requires B4A v6+.

Adding support for Firebase analytics:

1. Follow the Firebase integration tutorial: https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/#content


2. In Starter service:
B4X:
Sub Process_Globals
   Public analytics As FirebaseAnalytics
End Sub

Sub Service_Create
   analytics.Initialize
End Sub

That's it.

You can manually send events with:
B4X:
Starter.analytics.SendEvent("login", CreateMap ("additional parameter": 100))

Note that it can take several hours until the data is available in Firebase console:

SS-2016-06-09_10.03.24.png


SS-2016-06-09_10.03.58.png
 

Attachments

  • FirebaseAnalytics.zip
    2.5 KB · Views: 1,371
Last edited:

ivan.tellez

Active Member
Licensed User
Longtime User
Hi @Erel

It cannot catch such errors.

If the Firebase Crash Reports dont send the errors in the catch, whats is the best aproach to send to the console?

It is posible to use custom error sending with this lib Like in the Firebase examples?

B4X:
FirebaseCrash.report(new Exception("My first Android non-fatal error"));

Thanks
 

Eduardo Enri

Member
Licensed User
Thank you Erel.
I logged the "search" event with the standard parameters "search_term". In the console I can see the "search" event, but I can't see the parameter. This is a limit of firebase console as reported here: https://groups.google.com/forum/#!topic/firebase-talk/W9w-YKkW4fc
Here you can read: "Currently, not all suggested events provide parameter reporting, but we aim to add parameter reporting to all of them. In the meantime, your best options for viewing parameter reporting on these is to either use a different event (like select_content) or to view your data in BigQuery."
I'll try the event "select_content"...

Bye

Last news of this issue. Product manager of Firebase Analytics said (Feb. 2018):

"...We launched custom parameter reporting at Google I/O 2017. You can read more about it here. "
 

SMOOTSARA

Active Member
Licensed User
Longtime User
Hello dear friends šŸŒ¹
I am going to send the MAP parameter



B4X:
Dim map1 As Map
map1.Initialize
    map1.Put("aa","11")
    map1.Put("bb,"22")
    map1.Put("cc","33")
    map1.Put("dd","44")

Starter.analytics.SendEvent("login",map1)


Exactly where address can I see these values?
I refer to these addresses but do not find the values map1

1613219325650.png
 
Top