Consent tweaks.
Don't conditional Countly events on sendInfo, it already turns Countly on/off. Keep Sentry enabled for longer while turning on/off for sendInfo to cache more errors. Use sendInfoDecided event only for initial sendInfo prompt, can use Countly's censent tools to view overall opt-in/opt-outs.
This commit is contained in:
@@ -408,14 +408,8 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
|
||||
- (IBAction)togglePreference:(id)sender {
|
||||
|
||||
if (sender == self.diagnosticsItem) {
|
||||
BOOL sendInfo = self.diagnosticsItem.state != NSOnState;
|
||||
[[Countly sharedInstance] recordEvent:@"sendInfoDecided" segmentation:@{
|
||||
@"from": @"preferences",
|
||||
@"sendInfo": [@(sendInfo) description],
|
||||
}];
|
||||
[MPMacConfig get].sendInfo = @(sendInfo);
|
||||
}
|
||||
if (sender == self.diagnosticsItem)
|
||||
[MPMacConfig get].sendInfo = @(self.diagnosticsItem.state != NSOnState);
|
||||
if (sender == self.hidePasswordsItem)
|
||||
[MPMacConfig get].hidePasswords = @(self.hidePasswordsItem.state != NSOnState);
|
||||
if (sender == self.rememberPasswordItem)
|
||||
@@ -778,7 +772,6 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
CLYConsentSessions, CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
];
|
||||
if ([[MPMacConfig get].sendInfo boolValue]) {
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
if ([PearlLogger get].printLevel > PearlLogLevelInfo)
|
||||
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
||||
|
||||
@@ -796,10 +789,12 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
[scope setExtraValue:@([PearlDeviceUtils isAppEncrypted]) forKey:@"encrypted"];
|
||||
[scope setExtraValue:[PearlDeviceUtils platform] forKey:@"platform"];
|
||||
}];
|
||||
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
}
|
||||
else {
|
||||
[SentrySDK.currentHub getClient].options.enabled = @NO;
|
||||
[Countly.sharedInstance cancelConsentForFeatures:countlyFeatures];
|
||||
[SentrySDK.currentHub getClient].options.enabled = @NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,6 @@
|
||||
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
|
||||
BOOL sendInfo = returnCode != NSAlertSecondButtonReturn;
|
||||
[[Countly sharedInstance] recordEvent:@"sendInfoDecided" segmentation:@{
|
||||
@"from": @"initial",
|
||||
@"sendInfo": [@(sendInfo) description],
|
||||
}];
|
||||
[MPMacConfig get].sendInfo = @(sendInfo);
|
||||
|
Reference in New Issue
Block a user