Integrate Firebase with your Play Games services project

Firebase can help level up your game:

  • Log Games events withGoogle Analytics, a free app measurement solutionthat provides insight on app usage and user engagement.

  • Use any of theFirebase products that support games, likeCrashlytics,Remote Config, and more.

Get started

  1. If you haven't already, create a Firebase project, and then add Firebase toyour game (C++ |Unity).

    Note the following:
  2. Link your Firebase app to yourGoogle Play developer account.This same link will be used by yourPlay Games services project.
    In theFirebase console, go to theIntegrations tab.On theGoogle Play card, clickLink, and then follow the on-screeninstructions to create the link.

  3. Make sure that your app inGoogle Play isset up to usePlay Games services.

    When you're asked to specify whether your game already uses Google APIs, chooseYes, my game already uses Google APIs. Select your Firebase project from the list, and then clickUse.

Log Games events usingGoogle Analytics

  1. AddGoogle Analytics to your app.

  2. Once you've added the Firebase SDK forGoogle Analytics to your app,you can begin loggingPlay Games events. Here are some sampleevents you can log:

    • Login events

      Bundle bundle = new Bundle();mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.LOGIN, bundle);
    • Unlock achievements

      Bundle bundle = new Bundle();bundle.putString(FirebaseAnalytics.Param.ACHIEVEMENT_ID, achievementId);mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.UNLOCK_ACHIEVEMENT, bundle);
    • Scores on a leaderboard

      Bundle bundle = new Bundle();bundle.putLong(FirebaseAnalytics.Param.SCORE, score);bundle.putString("leaderboard_id", leaderboardId);mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.POST_SCORE, bundle);
  3. You can view the logged events in theAnalytics dashboard of theFirebase console.

    You can also access theFirebase console from thePlay Console by clicking the Firebase icon next to your app’s icon in the Game detailspage.

Troubleshooting common errors

Cannot viewPlay Games events in theAnalytics dashboard

Cannot linkGoogle Play to Firebase

You need tolinkGoogle Play to Firebase using theFirebase console( >Project settings >Integrations >Google Play). If you're having trouble linking, check thefollowing:

Cannot access theFirebase console from thePlay Console

Make sure that yourGoogle Play developer account is linked to a Firebase app. In thePlay Console, an Owner orAdmin of thePlay developer account can view the linking status underSetup >Linked Services >Firebase.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.