-
Notifications
You must be signed in to change notification settings - Fork 14
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
Track TestFlight vs AppStore installations in Posthog #1735
Conversation
Co-authored-by: Bryan Montz <bryanmontz@me.com>
Co-authored-by: Bryan Montz <bryanmontz@me.com>
@pelumy did you test this on the macOS version of our app? I thought I read somewhere that the receipt trick doesn't work on macOS. |
@mplorentz, this only works for iOS. I didn't include the macOS one because we don't have the app released on macOS. Do we want to include that? |
@pelumy yeah I think that's a requirement. We do have the app released on macOS, it's just not compiled for macOS. But it shows up in the Mac App Store under "iPhone & iPad apps". I think currently we'll count TestFlight installs on macOS as App Store installs, so the numbers will be off. I think this gist claims to work on macOS too. |
Issues covered
#130
Description
This PR tries to track where the app running in the user's device is downloaded from. There is a link in the ticket that shows that the
appstoreReceiptUrl
can be used to differentiateApp Store
fromTestFlight
.There were 2 tracking options: Identify and Capture.
Though, Identify matches the user to a specific event across all devices, so no single user's download across various devices is tracked twice.
I opted to use Capture instead because, if the user is not logged in, we won't be able to associate them with their unique id, which can be their npub in this case. It also defeats the purpose of getting the real number of downloads as it won't count a user that hasn't logged in yet. But it will include each download by a single user across multiple devices.
If we only want to get the number of downloads of people, I can update the tracking to use
identify
instead ofcapture
.How to test
Merge and check if events shows up on Posthog after app is downloaded on TestFlight and App Store.