In iNat Next we log a unique identifier for the installation with every HTTP request the app makes, allowing us to collect metrics about all users, not just signed in users or observers. In order to compare iNat Next with the apps it will ostensibly replace, we want the native apps to do the same thing so we can compare things like signed out retention time in the native iPhone app vs iNat Next.
[ ] Estimate how long this will take and report before proceeding (if this is hard, leadership may deprioritize it)
[ ] Store a UUID that is unique for each installation. That means if a user downloads the app, they should have the same installation ID until they uninstall the app. The installation ID should remain the same between app updates and sign in/out.
[ ] Submit that UUID as the value of the X-Installation-ID header for all requests the app makes to our API, including api.inaturalist.org AND auth-related Rails endpoints like www.inaturalist.org/users/api_token.json
In iNat Next we log a unique identifier for the installation with every HTTP request the app makes, allowing us to collect metrics about all users, not just signed in users or observers. In order to compare iNat Next with the apps it will ostensibly replace, we want the native apps to do the same thing so we can compare things like signed out retention time in the native iPhone app vs iNat Next.
X-Installation-ID
header for all requests the app makes to our API, includingapi.inaturalist.org
AND auth-related Rails endpoints likewww.inaturalist.org/users/api_token.json
Analogous code in iNat Next is at https://github.com/inaturalist/iNaturalistReactNative/commit/7ea60f7b9b96cfc0b3502f78258aff4117d8596f#diff-04caadce6ee341e3b733b5bb94dcf5907f82eaebba541bde03078cd551e42209R11-R17