# Analytics with Firebase

**URL:** <https://forum.juce.com/t/analytics-with-firebase/26475>\
**Category:** General JUCE discussion\
**Created:** [February 19, 2018, 2:40pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475 "2018-02-19T14:40:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pchanley](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@pchanley](https://forum.juce.com/u/pchanley)\
**Post date:** [February 19, 2018, 2:40pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/1 "2018-02-19T14:40:28Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![noahdayan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/noahdayan/32/4093_2.png) [@noahdayan](https://forum.juce.com/u/noahdayan)\
**Post date:** [February 19, 2018, 3:13pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/3 "2018-02-19T15:13:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lukasz-kozakiewicz](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lukasz-kozakiewicz](https://forum.juce.com/u/lukasz-kozakiewicz)\
**Post date:** [February 20, 2018, 11:07am UTC](https://forum.juce.com/t/analytics-with-firebase/26475/4 "2018-02-20T11:07:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pchanley](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@pchanley](https://forum.juce.com/u/pchanley)\
**Post date:** [March 13, 2018, 5:28pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/5 "2018-03-13T17:28:49Z")

</div>

are you Firebase via the firebase sdk?

---

<div class="post-metadata">

**Author:** ![lukasz-kozakiewicz](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lukasz-kozakiewicz](https://forum.juce.com/u/lukasz-kozakiewicz)\
**Post date:** [March 14, 2018, 10:48am UTC](https://forum.juce.com/t/analytics-with-firebase/26475/6 "2018-03-14T10:48:25Z")

</div>

Yes, we used Firebase SDK.

---

<div class="post-metadata">

**Author:** ![DEADBEEF](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DEADBEEF](https://forum.juce.com/u/DEADBEEF)\
**Post date:** [September 6, 2018, 12:31pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/7 "2018-09-06T12:31:11Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![pchanley](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@pchanley](https://forum.juce.com/u/pchanley)\
**Post date:** [September 6, 2018, 12:55pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/8 "2018-09-06T12:55:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DEADBEEF](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DEADBEEF](https://forum.juce.com/u/DEADBEEF)\
**Post date:** [September 6, 2018, 1:13pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/9 "2018-09-06T13:13:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lukasz-kozakiewicz](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lukasz-kozakiewicz](https://forum.juce.com/u/lukasz-kozakiewicz)\
**Post date:** [September 7, 2018, 8:11am UTC](https://forum.juce.com/t/analytics-with-firebase/26475/10 "2018-09-07T08:11:45Z")

</div>

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](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/](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](https://juce.com/workshops)

---

<div class="post-metadata">

**Author:** ![DEADBEEF](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DEADBEEF](https://forum.juce.com/u/DEADBEEF)\
**Post date:** [September 7, 2018, 9:32am UTC](https://forum.juce.com/t/analytics-with-firebase/26475/11 "2018-09-07T09:32:45Z")

</div>

Thank you so much for your reply @lukasz-kozakiewicz  
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.

---

<div class="post-metadata">

**Author:** ![lukasz-kozakiewicz](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lukasz-kozakiewicz](https://forum.juce.com/u/lukasz-kozakiewicz)\
**Post date:** [September 9, 2018, 4:35pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/12 "2018-09-09T16:35:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DEADBEEF](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DEADBEEF](https://forum.juce.com/u/DEADBEEF)\
**Post date:** [September 9, 2018, 4:52pm UTC](https://forum.juce.com/t/analytics-with-firebase/26475/13 "2018-09-09T16:52:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [September 10, 2018, 12:43am UTC](https://forum.juce.com/t/analytics-with-firebase/26475/14 "2018-09-10T00:43:14Z")

</div>

@lukasz-kozakiewicz 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!

---

<div class="post-metadata">

**Author:** ![lukasz-kozakiewicz](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lukasz-kozakiewicz](https://forum.juce.com/u/lukasz-kozakiewicz)\
**Post date:** [September 10, 2018, 8:10am UTC](https://forum.juce.com/t/analytics-with-firebase/26475/15 "2018-09-10T08:10:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [September 10, 2018, 8:12am UTC](https://forum.juce.com/t/analytics-with-firebase/26475/16 "2018-09-10T08:12:04Z")

</div>

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