Skip to main content
Version: SDK 4.5.x

Integrate with Firebase

If you are using the Firebase SDK next to the justtrack SDK, you can use the justtrack SDK to send the Firebase app instance ID of a user to the justtrack backend. You can then later send events from the justtrack backend to Firebase to measure events happening outside of your app. To send these events, the justtrack backend needs the Firebase App instance ID of the user. You can send this by calling await JustTrackSdk.setFirebaseAppInstanceId('your_id'), but of course this requires you to add additional boilerplate code to your app.

To help you here, the justtrack SDK detects the presence of the Firebase SDK at runtime and automatically performs a call to publishFirebaseAppInstanceId() with the correct value.

info

If you don't want this behavior, you can disable it by using builder.withEnableFirebaseIntegration(false) when constructing an instance of the justtrack SDK.