Skip to content

Commit

Permalink
fix: added support for segmentation for event action for contents
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Nov 28, 2024
1 parent 1dc8f1c commit 791f236
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion CountlyWebViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 791f236

Please sign in to comment.