Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added support for segmentation for event action for contents #365

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading