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.
