Skip to content
weballin

weballin DIGIWIKI

App Instance ID

The app instance ID is a unique identifier that the Firebase SDK generates per mobile app install and acts like a client ID in your app. Used as the app_instance_id parameter when sending app events from the server using the measurement protocol.

weballin

App Instance ID is the basic unit for identifying app installs in Firebase Analytics (the foundation of GA4 App Streams). Just as the _ga cookie stores the client ID on the web, in apps, the Firebase SDK stores the app instance ID on the device.

The app instance ID is newly created when the app is deleted and reinstalled, the device is reset, or the device is changed. Therefore, like the client ID on the web, there are limits to tracking the same user over a long period of time. This limitation is compensated for by setting the user ID in the app.

When sending app events from the server using the measurement protocol, app_instance_id must be passed instead of client_id to be properly connected to app user data. You can query the current app instance ID using the Firebase console or Firebase SDK's FirebaseAnalytics.getAppInstanceId() method.

Key takeaways

  • This is a unique identifier that the Firebase SDK automatically creates when installing an app, and serves as a client ID in the app.
  • A new ID is issued when the app is deleted and reinstalled or the device is reset.
  • When transmitting an app event using the measurement protocol, it is passed as the app_instance_id parameter.
  • Check the current value using the Firebase SDK's FirebaseAnalytics.getAppInstanceId() method.
  • When used in conjunction with User ID, users can be connected even after reinstalling the app.

References

Frequently asked questions

How do I check my app instance ID?

Retrieve it asynchronously by calling the FirebaseAnalytics.getInstance(context).getAppInstanceId() method on Android and Analytics.appInstanceID() method on iOS. In the Firebase console, it is displayed when viewing the device's events in DebugView.

Are the app instance ID and Firebase installation ID (FID) different?

It's a different concept. The app instance ID is an identifier for Analytics, and the Firebase Installation ID (FID) is a separate identifier used to identify the device across all Firebase services (FCM, Remote Config, etc.).