diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b2e77a..daec9b8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Mitigated an issue where visibility could have been wrongly assigned if a view was closed while going to background. (Experimental!) * Mitigated an issue where the user provided URLSessionConfiguration was not applied to direct requests * Mitigated an issue where a concurrent modification error could have happen when starting multiple stopped views +* Mitigated an issue that parsing internal content event segmentation. ## 24.7.7 * Changed the visibility tracking segmentation values to binary diff --git a/CountlyWebViewManager.m b/CountlyWebViewManager.m index 258588a0..14a954ff 100644 --- a/CountlyWebViewManager.m +++ b/CountlyWebViewManager.m @@ -208,11 +208,15 @@ - (void)recordEventsWithJSONString:(NSString *)jsonString { for (NSDictionary *event in events) { NSString *key = event[@"key"]; - NSDictionary *segmentation = event[@"sg"]; + NSDictionary *segmentation = event[@"segmentation"]; + NSDictionary *sg = event[@"sg"]; if(!key) { CLY_LOG_I(@"Skipping the event due to key is empty or nil"); continue; } + if(sg) { + segmentation = sg; + } if(!segmentation) { CLY_LOG_I(@"Skipping the event due to missing segmentation"); continue;