Skip to content

Commit 4570e00

Browse files
authored
Merge pull request #365 from Countly/fix_contents
fix: added support for segmentation for event action for contents
2 parents a052170 + 791f236 commit 4570e00

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Mitigated an issue where visibility could have been wrongly assigned if a view was closed while going to background. (Experimental!)
55
* Mitigated an issue where the user provided URLSessionConfiguration was not applied to direct requests
66
* Mitigated an issue where a concurrent modification error could have happen when starting multiple stopped views
7+
* Mitigated an issue that parsing internal content event segmentation.
78

89
## 24.7.7
910
* Changed the visibility tracking segmentation values to binary

CountlyWebViewManager.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,15 @@ - (void)recordEventsWithJSONString:(NSString *)jsonString {
208208

209209
for (NSDictionary *event in events) {
210210
NSString *key = event[@"key"];
211-
NSDictionary *segmentation = event[@"sg"];
211+
NSDictionary *segmentation = event[@"segmentation"];
212+
NSDictionary *sg = event[@"sg"];
212213
if(!key) {
213214
CLY_LOG_I(@"Skipping the event due to key is empty or nil");
214215
continue;
215216
}
217+
if(sg) {
218+
segmentation = sg;
219+
}
216220
if(!segmentation) {
217221
CLY_LOG_I(@"Skipping the event due to missing segmentation");
218222
continue;

0 commit comments

Comments
 (0)