google-services.json for Firebase and Google Analytics

2,313 views
Skip to first unread message

amod kanthe

unread,
Oct 13, 2016, 6:38:03 AM10/13/16
to Firebase Google Group

I want to use Google Analytics and Firebase both in my project. I have downloaded google-services.json file from the Firebase console settings but after using it, I am not able to support Google Analytics. It is showing me the error:

Error:(463, 49) error: cannot find symbol variable global_tracker

How to configure both in same .json file?

Following field is missing from .json file downloaded from firebase dashboard.

"services": {
    "analytics_service": {
      "status": 2,
      "analytics_property": {
        "tracking_id": "some_tracking_id"
      }
    },

amod kanthe

unread,
Oct 13, 2016, 6:38:58 AM10/13/16
to Firebase Google Group

Doug Stevenson

unread,
Oct 13, 2016, 5:28:25 PM10/13/16
to Firebase Google Group
You're not supposed to make any changes to the google-services.json file after you download it.  Its contents should not matter at all to you - you simply drop the file into your project, and the plugin works with it automatically.  When you integrate Firebase into your Android app, Analytics is always integrated by default and will collect data until you manually disable it.

Google Analytics has a completely different integration path than Firebase Analytics.  What you do to integrate one will not apply to the other.

That error message you show is kind of vague.  How do you know it's related to either Analytics product?  Have you observed any problems with collecting data in either service?

Doug
Reply all
Reply to author
Forward
0 new messages