From cb4ac46b66d6a90b186eb38a8943c782ecb7b524 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Sun, 9 Feb 2025 18:34:22 -0500 Subject: [PATCH] docs(analytics): emphasize the need to install Async Storage it was already documented, but not directly in analytics, and not mentioning the consequence in analytics of not installing AsyncStorage --- docs/analytics/usage/index.md | 6 ++++++ docs/platforms.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/analytics/usage/index.md b/docs/analytics/usage/index.md index 6d5e6a839e..f647a3edec 100644 --- a/docs/analytics/usage/index.md +++ b/docs/analytics/usage/index.md @@ -146,6 +146,12 @@ import analytics from '@react-native-firebase/analytics'; const appInstanceId = await analytics().getAppInstanceId(); ``` +### Web / Other platform instance id + +Ensure you have installed an Async Storage provider for Firebase to preserve the instance id. Failure to do so means the instance id will be reset every time the application terminates. + +The main documentation for "other platform" support contains [an example.](/platforms#async-storage) + # Disable Ad Id usage on iOS Apple has a strict ban on the usage of Ad Ids ("IDFA") in Kids Category apps. They will not accept any app diff --git a/docs/platforms.md b/docs/platforms.md index df42726573..c454c137b3 100644 --- a/docs/platforms.md +++ b/docs/platforms.md @@ -91,7 +91,7 @@ await firebase.initializeApp({ ... }); If you do not provide an Async Storage implementation, we use an in memory implementation which will result in resetting the data every time your app is restarted, in the case of -Firebase Auth this means your users have to sign in again. +Firebase Auth this means your users have to sign in again and for Firebase Analytics the app will generate a new instance id and look like a new installation every time. ### Analytics