androidgoogle-analyticsgoogle-analytics-firebasegoogle-play-services

Is google-services.json confidential?


Following the guide on setting up Google Analytics in an Android app (https://developers.google.com/analytics/devguides/collection/android/v4/) I am left wondering if this google-services.json file can safely be committed into source code versioning and pushed to a public GitHub repository or if this file may contain credentials or secrets.

I cannot find a definite answer elsewhere, but I can see that sample apps both commit the file (https://github.com/google/climb-tracker/blob/master/mobile/google-services.json) and others have added the file to their .gitignore.


Solution

  • It should be considered confidential. The json file that is generated contains an api_key that you can use to send push notifications.

    If you go to Credentials page on the Google Developer Console, you'll see the key in the json file listed under API keys