Analytics with Firebase


#1

I am looking for an example using the new analytics with Firebase.

Thanks


#3

We currently don’t have an analytics example that uses Firebase in the JUCE examples.


#4

We have used Firebase analytics ourselves both on iOS and Android though, so it’s definitely possible to do.


#5

are you Firebase via the firebase sdk?


#6

Yes, we used Firebase SDK.


#7

@pchanley Did you find a way to use Firebase instead of google analytics?

Or, @lukasz.k could tell us a little bit more about how you manage to integrate it. Would you have some links to share?


#8

We decided to move on from firebase as it could not give us the statistics we were looking for. created an in-house system.

thanks


#9

Ok I understand.
Btw, thanks for replying quickly in this old topic.


#10

To integrate Firebase SDK on iOS, one needs to declare custom iOS delegate (with macro START_JUCE_APPLICATION_WITH_CUSTOM_DELEGATE (AppName, DelegateClassName) and write some ObjC code - both for the custom delegate (to setup FIR SDK) as well as for actual analytics (to call [FIRAnalytics logEventWithName: parameters:] etc). The functions required to be implemented are described in Firebase docs: https://firebase.google.com/docs/analytics/ios/start

On Android, one has to configure gradle files to install the dependencies (can be done with Projucer Android exporter fields) as described in https://firebase.google.com/docs/analytics/android/start/ . Then call Java from C++, which requires declaring JNI classes using DECLARE_JNI_CLASS macro (see JUCE codebase for examples).

We don’t have a working example online, but we intend to give a detailed walkthrough of the process in ADC workshop Under the hood of JUCE for SDKs like Firebase, Facebook etc https://juce.com/workshops


#11

Thank you so much for your reply @lukasz.k
But from what I understand we cannot use Firebase with c++ only right?
I was looking for a way to move from GA to an other analytic tool for a full c++ desktop plugin.


#12

Yes, their C++ SDK is simply a wrapper around Java/iOS interfaces for Android/iOS. I don’t think there is an equivalent Firebase desktop SDK


#13

That’s what I was afraid…
Thank you for you insight, I really appreciate.


#14

@lukasz.k is the same true if we’re trying to use AdMob? What about all of those steps to use Cocoa Pods to set it all up after projucer makes the xcodeproj file? there are a few of us who can’t wait until the ADC talk in November to get Firebase into our JUCE products, so any input would be appreciated! Even an example project in a github repo would suffice!


#15

I have not tried AdMob myself, looking at the SDK documentation it says it is for iOS, Android, Unity.

CocoaPods is not really compatible with Projucer as it generates Xcode projects (workspaces) by itself, so one tool would overwrite the other. All CocoaPods does it sets up the project with all the dependencies (input libs, headers etc) - if there are no instructions how to set up the SDK manually, one can set it up with CocoaPods first and then recreate the settings in Projucer, based on what CocoaPods did.


#16

How did you get Firebase Analytics working with JUCE then? Admob is a part of Firebase.