Repository navigation
Re-send analytics user properties when usage sharing is turned on - #34
Merged
Merged
Conversation
User properties such as App Name, Workspace Revision and Pump Type are identified once at launch. If usage data sharing was off then, they were dropped, and nothing sent them once sharing was turned on, so they stayed empty until Loop was relaunched. Keep the latest value of each property and send them all when the preference changes to Share Usage Data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Loop sends user properties (App Name, Workspace Revision, Dosing Strategy, Services, and with LoopKit/Loop changes coming also Pump Type, CGM Type and algorithm experiment state) once, at launch. If Usage Data Sharing was not Share Usage Data at that point,
LoopKitAnalyticsdropped them. Turning sharing on later created the client but didn't re-send anything, so the properties stayed empty until the next relaunch. This was seen on a test device: no$identifyafter sharing was turned on, then one arrived after a force-quit.LoopKitAnalyticsnow keeps the latest value of each identified property, whatever the sharing setting, and sends all of them in one identify when the preference changes to Share Usage Data. Nothing is sent while sharing is below that level.Tested by building the LoopWorkspace scheme for device. Not yet exercised on a phone.