Integrate Firebase with your Play Games services project Stay organized with collections Save and categorize content based on your preferences.
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
If you haven't already, create a Firebase project, and then add Firebase toyour game (C++ |Unity).
Note the following:- If you've previously linked yourGoogle Play developer account to aGoogle Cloud project in thePlay Console, use that same project for getting started with Firebase. Behind the scenes, a Firebase project is aGoogle Cloud project (learn more).
- Make sure to enableGoogle Analytics during the Firebase project creation flow or enable it after project creation in theIntegrations tab of theFirebase console.
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.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
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);
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
Check that you'veenabledGoogle Analytics for your Firebaseproject and that you'veintegratedGoogle Analyticsinto your game.
Verify that your code implements events for
LOGIN,UNLOCK_ACHIEVEMENT, orPOST_SCORE.Verify the SDK is logging events by enablingverbose logging.Because devices batch events to preserve battery life, it can take some timebefore these events are visible 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:
Make sure that your app meets all theprerequisites for linking.
Make sure that you have therequired access for creating the link.
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.