---
title: Configure Firebase
slug: configured-commerce/docs/configure-firebase
docTags: 
createdAt: 2026-08-13T10:46:29.000Z
---

To use a Firebase account with your Optimizely Configured Commerce Mobile App, complete the following steps.

## Create a Firebase project

1. Go to the [Firebase Console](https://console.firebase.google.com/).
2. Log in with your Google account, or create one if needed.
3. Click **Add Project**.
4. Enter your project name, such as *YourCompanyNameB2BApp*.
5. (Optional) Enter the **Project ID** if you want a custom identifier.
6. Click **Continue**.
7. Enable Google Analytics to view mobile analytics in Firebase, or keep it disabled.
8. Click **Create Project**.
9. Wait for Firebase to finish provisioning.
10. Click **Continue** to enter your new project dashboard.

## Add your app to the Firebase project

You must add your mobile app (IOS or Android) to the Firebase project to use the services offered.

### Android

1. Go to the Firebase project settings.
2. Click **Android** from **Add app to get started**.
3. Enter your app's **applicationId** from your app's `android/app/build.gradle` file from `defaultConfig`.
4. (Optional) Add an app nickname.
5. Click **Register app**.
6. Click **Download google-services.json**.
7. Place this file in your app’s android/app directory in your Android project.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/BambdsVaPi3kKdZVF_ZMG_379d227f66936b3b267b67fdf2711b24c69b008fbba81a3d6be3e7d16383a9ce-google-services-file.png)

### iOS

1. Go to the project settings.
2. Click **iOS** from **Add app to get started**.
3. Enter your app's iOS bundle identifier (from Xcode).

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/KUumJkMxoA7zNdaLl-Wld_b6d68925ef0054a99c945d45c5744f4e9ea74790132a3f31cc3b27ca09be3168-bundle-indentifier.png)

4. (Optional) Add an app nickname.
5. Click **Register app**.

## Update base\_config.json

Update the following values in `base_config.json`, which help establish the connection between the app and firebase:

- `"firebaseAndroidApiKey"`
- `"firebaseAndroidAppId"`
- `"firebaseAndroidMessagingSenderId"`
- `"firebaseAndroidProjectId"`
- `"firebaseAndroidStorageBucket"`
- `"firebaseIOSApiKey"`
- `"firebaseIOSAppId"`
- `"firebaseIOSMessagingSenderId"`
- `"firebaseIOSProjectId"`
- `"firebaseIOSStorageBucket"`
- `"firebaseIOSBundleId"`

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/wGzBcKfq2mCbh_OyNzQLR_93699a75cf5b67b54787ccec8f4b5d14cb6fd6b1b1132a242f7c955376ea445c-edit-base-config-values.png)

You can collect these values from the `google_service.json` and`GoogleService-Info.plist` files. Locate these files by going to the project settings and selecting **GoogleService-Info.plist** for the app.

### Map values for GoogleService-Info.plist

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/mGX4RWMyAFG-2O-OseRg6_f0071a3c1808b350f45f7e0780a516083f63035478769578f65e32bbcfdd0390-googleservice-info.png)

Map the following values from the `GoogleService-Info.plist` file.

- `"firebaseIOSApiKey" : "API_KEY",`
- `"firebaseIOSAppId" : "GOOGLE_APP_ID",`
- `"firebaseIOSMessagingSenderId" : "GCM_SENDER_ID",`
- `"firebaseIOSProjectId" : "PROJECT_ID",`
- `"firebaseIOSStorageBucket" : "STORAGE_BUCKET",`
- `"firebaseIOSBundleId" : "BUNDLE_ID"`

### Map values for google\_services.json

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Dpldi3c38p93uJyl8Y5fJ_a16e3f06e2ca75dd450077e11a79a8a5cc2ab9820f852d7579e6e2750911e387-google-services-file-in-firebase.png)

Map the following values from the `google_services.json` file. If you have multiple clients in the file, copy the one where your Android application ID matches the `package_name `inside that client.

- `"firebaseAndroidApiKey" : "current_key",`
- `"firebaseAndroidAppId" : "mobilesdk_app_id",`
- `"firebaseAndroidMessagingSenderId" : "project_number",`
- `"firebaseAndroidProjectId" : "project_id",`
- `"firebaseAndroidStorageBucket" : "storage_bucket",`
