Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is First Run On Device #122

Open
3 tasks
winsmith opened this issue Sep 22, 2023 · 3 comments
Open
3 tasks

Is First Run On Device #122

winsmith opened this issue Sep 22, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@winsmith
Copy link
Contributor

winsmith commented Sep 22, 2023

Based on the sheer number of people asking me about this every time I post this graph, it might be worth automatically adding some kind of simple "isFirstRunOnDevice" flag on all logs into the SDK

  • Gate this code so it only runs on platforms which du supply a UserDefault implementation
  • Check if com.telemetrydeck.[APP_ID].hasInitializedBefore is set (replace [APP ID] with the app's ID. If it is not set, set it to true.
  • On Signal send, add a payload value with key "isFirstRunOnDevice" and value either "true" or "false"
@winsmith winsmith added the enhancement New feature or request label Sep 22, 2023
@winsmith winsmith added the help wanted Extra attention is needed label Oct 4, 2023
@Jeehut
Copy link
Contributor

Jeehut commented Dec 1, 2024

There is a more reliable API to check if this was the first app install using the AppTransaction API which as an originalPurchaseDate field that returns the date the app was first downloaded on the App Store. This way even installs after switching a device would not get re-detected as "first installs".

Having that said, we still need a way to persist that we have reported this already. But it probably should be combined with the original purchase date and if that was more than – say 3 days ago – then it's likely this is not the first install.

And rather than using UserDefaults, at least on iOS we could use the keychain. Because entries there are not deleted even if the app is uninstalled and reinstalled on the same device.

@kkostov
Copy link

kkostov commented Dec 11, 2024

If the app is reinstalled after some time/different device, doesn't this count as a "first run" as well?

@Jeehut
Copy link
Contributor

Jeehut commented Dec 11, 2024

@kkostov That depends on what the stats really will represent and how they will be used. You are right that "first run on device" is more clear when it's not synced across devices, but I'm thinking about this as part of the Pirate Metrics approach overall and there, when thinking about acquisition/activation, it's more relevant what "users" are doing rather than what "devices" are doing. I don't think it's "user acquisition" if a user just buys a new phone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants