Skip to content

Existing Users Setup

When you already have an existing user base, you should include a firstSeen timestamp so your analytics reflect when users first installed your app. Especially if you have a large existing userbase. This allows the devgrowthlab service to correct model your apps retention curve. Below are the recommended ways to detect the first install time per platform.

Send the first install timestamp along with your ingestion requests:

{
"firstSeen": 1760399940,
"lastToken": ...,
"cohorts": ...
}
  • firstSeen: a Unix timestamp (seconds or milliseconds since epoch) representing the first time the user had the app installed.
  • This allows the service to correctly model the retention curve for your app.

import android.content.pm.PackageManager
// Retrieve first install time from PackageManager
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
val firstSeen = packageInfo.firstInstallTime

Include the firstSeen timestamp in your ingestion requests:

{
"firstSeen": 1760399940,
"lastToken"...
}

There’s no need to keep this code in your app long term, include it initially for a month or two, once your existing users have updated then its safe to remove the code. Just ensure you continue to send the last token in the API requests as this is usually how devgrowthlab keeps track of users’ tenure.


This ensures your analytics reflect the true install time for existing users, and avoids counting them as new users the next time the user opens the app.