diff --git a/CHANGELOG.md b/CHANGELOG.md index 93d39e9e..f4887ad4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## 23.2.2 +* Added "previous event ID" logic for non-internal events +* Session update interval upper limit (10 minutes) has been lifted in Android +* Updated default maxSegmentationValues from 30 to 100 for iOS +* Updated Underlying android SDK version to 22.09.3 +* Updated Underlying iOS SDK version to 23.02.1 + +## 23.2.2-np +* Added "previous event ID" logic for non-internal events +* Session update interval upper limit (10 minutes) has been lifted in Android +* Updated default maxSegmentationValues from 30 to 100 for iOS +* Updated Underlying android SDK version to 22.09.3 +* Updated Underlying iOS SDK version to 23.02.1 + ## 23.2.1 * Fixed a bug in Android where metric override values were not applying to crash metrics Fixed a bug where crash metrics sent the "manufacturer" value under the wrong key * Fixed a bug in Android where orientation events would have the same view ID as the previous view event diff --git a/android/build.gradle b/android/build.gradle index eb1f550b..15211745 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -34,6 +34,6 @@ android { } dependencies { - implementation 'ly.count.android:sdk:22.09.1' + implementation 'ly.count.android:sdk:22.09.3' implementation 'com.google.firebase:firebase-messaging:20.2.1' } diff --git a/android/src/main/java/ly/count/dart/countly_flutter/CountlyFlutterPlugin.java b/android/src/main/java/ly/count/dart/countly_flutter/CountlyFlutterPlugin.java index ab5df56d..a821aa06 100644 --- a/android/src/main/java/ly/count/dart/countly_flutter/CountlyFlutterPlugin.java +++ b/android/src/main/java/ly/count/dart/countly_flutter/CountlyFlutterPlugin.java @@ -58,7 +58,7 @@ */ public class CountlyFlutterPlugin implements MethodCallHandler, FlutterPlugin, ActivityAware, DefaultLifecycleObserver { private static final String TAG = "CountlyFlutterPlugin"; - private final String COUNTLY_FLUTTER_SDK_VERSION_STRING = "23.2.1"; + private final String COUNTLY_FLUTTER_SDK_VERSION_STRING = "23.2.2"; private final String COUNTLY_FLUTTER_SDK_NAME = "dart-flutterb-android"; private final String COUNTLY_FLUTTER_SDK_NAME_NO_PUSH = "dart-flutterbnp-android"; diff --git a/example-no-push/android/app/build.gradle b/example-no-push/android/app/build.gradle index 7236aa2d..a4c6f7dc 100644 --- a/example-no-push/android/app/build.gradle +++ b/example-no-push/android/app/build.gradle @@ -59,6 +59,6 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - implementation 'ly.count.android:sdk:22.09.1' + implementation 'ly.count.android:sdk:22.09.3' } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 1e00687f..4aec1a7c 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -59,7 +59,7 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - implementation 'ly.count.android:sdk:22.09.1' + implementation 'ly.count.android:sdk:22.09.3' implementation 'com.google.firebase:firebase-messaging:20.2.1' } apply plugin: 'com.google.gms.google-services' // Google Play services Gradle plugin diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index bbea6997..a3f60d63 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - countly_flutter (23.2.1): + - countly_flutter (23.2.2): - Flutter - Flutter (1.0.0) @@ -14,7 +14,7 @@ EXTERNAL SOURCES: :path: Flutter SPEC CHECKSUMS: - countly_flutter: 7f716cfa98918f50ecd38a6b705ac581d573d977 + countly_flutter: 78a293ba08c1aed6fc88a162dfcbcae8e31312d5 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 diff --git a/ios/Classes/CountlyFlutterPlugin.m b/ios/Classes/CountlyFlutterPlugin.m index efe4917f..d62b6ab3 100644 --- a/ios/Classes/CountlyFlutterPlugin.m +++ b/ios/Classes/CountlyFlutterPlugin.m @@ -23,7 +23,7 @@ + (CountlyFeedbackWidget *)createWithDictionary:(NSDictionary *)dictionary; CLYPushTestMode const CLYPushTestModeProduction = @"CLYPushTestModeProduction"; -NSString *const kCountlyFlutterSDKVersion = @"23.2.1"; +NSString *const kCountlyFlutterSDKVersion = @"23.2.2"; NSString *const kCountlyFlutterSDKName = @"dart-flutterb-ios"; NSString *const kCountlyFlutterSDKNameNoPush = @"dart-flutterbnp-ios"; diff --git a/ios/Classes/CountlyiOS/CHANGELOG.md b/ios/Classes/CountlyiOS/CHANGELOG.md index 313a6f2a..e5b9e193 100644 --- a/ios/Classes/CountlyiOS/CHANGELOG.md +++ b/ios/Classes/CountlyiOS/CHANGELOG.md @@ -1,9 +1,11 @@ +## 23.02.1 +- Added previous event ID and sending it with custom events. +- Updated default `maxSegmentationValues` from 30 to 100 + ## 23.02.0 - Added event IDs - Added current and previous view IDs to events - Added sending pending events before sending user details on `save` call. - - ## 22.09.0 - Deleted previously deprecated `userLoggedIn:` and `userLoggedOut` methods diff --git a/ios/Classes/CountlyiOS/Countly-PL.podspec b/ios/Classes/CountlyiOS/Countly-PL.podspec index 79c2d358..be8f4edb 100644 --- a/ios/Classes/CountlyiOS/Countly-PL.podspec +++ b/ios/Classes/CountlyiOS/Countly-PL.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Countly-PL' - s.version = '23.02.0' + s.version = '23.02.1' s.license = { :type => 'MIT', :file => 'LICENSE.md' } s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.' s.homepage = 'https://github.com/Countly/countly-sdk-ios' diff --git a/ios/Classes/CountlyiOS/Countly.m b/ios/Classes/CountlyiOS/Countly.m index 6257cb10..b77fd8ce 100644 --- a/ios/Classes/CountlyiOS/Countly.m +++ b/ios/Classes/CountlyiOS/Countly.m @@ -14,6 +14,8 @@ @interface Countly () @end long long appLoadStartTime; +// It holds the event id of previous recorded custom event. +NSString* previousEventID; @implementation Countly @@ -603,23 +605,13 @@ - (void)recordEvent:(NSString *)key segmentation:(NSDictionary *)segmentation co { CLY_LOG_I(@"%s %@ %@ %lu %f %f", __FUNCTION__, key, segmentation, (unsigned long)count, sum, duration); - NSDictionary * reservedEvents = - @{ - kCountlyReservedEventOrientation: @(CountlyConsentManager.sharedInstance.consentForUserDetails), - kCountlyReservedEventStarRating: @(CountlyConsentManager.sharedInstance.consentForFeedback), - kCountlyReservedEventSurvey: @(CountlyConsentManager.sharedInstance.consentForFeedback), - kCountlyReservedEventNPS: @(CountlyConsentManager.sharedInstance.consentForFeedback), - kCountlyReservedEventPushAction: @(CountlyConsentManager.sharedInstance.consentForPushNotifications), - kCountlyReservedEventView: @(CountlyConsentManager.sharedInstance.consentForViewTracking), - }; - - NSNumber* aReservedEvent = reservedEvents[key]; + BOOL isReservedEvent = [self isReservedEvent:key]; - if (aReservedEvent) + if (isReservedEvent) { CLY_LOG_V(@"A reserved event detected: %@", key); - if (!aReservedEvent.boolValue) + if (!isReservedEvent) { CLY_LOG_W(@"Specific consent not given for the reserved event! So, it will not be recorded."); return; @@ -677,6 +669,16 @@ - (void)recordEvent:(NSString *)key segmentation:(NSDictionary *)segmentation co event.CVID = CountlyViewTracking.sharedInstance.currentViewID ?: @""; } + // Check if the event is a reserved event + BOOL isReservedEvent = [self isReservedEvent:key]; + + // If the event is not reserved, assign the previous event ID to the current event's PEID property, or an empty string if previousEventID is nil. Then, update previousEventID to the current event's ID. + if(!isReservedEvent) + { + event.PEID = previousEventID ?: @""; + previousEventID = event.ID; + } + event.segmentation = segmentation; event.count = MAX(count, 1); event.sum = sum; @@ -688,6 +690,22 @@ - (void)recordEvent:(NSString *)key segmentation:(NSDictionary *)segmentation co [CountlyPersistency.sharedInstance recordEvent:event]; } +- (BOOL)isReservedEvent:(NSString *)key +{ + NSDictionary * reservedEvents = + @{ + kCountlyReservedEventOrientation: @(CountlyConsentManager.sharedInstance.consentForUserDetails), + kCountlyReservedEventStarRating: @(CountlyConsentManager.sharedInstance.consentForFeedback), + kCountlyReservedEventSurvey: @(CountlyConsentManager.sharedInstance.consentForFeedback), + kCountlyReservedEventNPS: @(CountlyConsentManager.sharedInstance.consentForFeedback), + kCountlyReservedEventPushAction: @(CountlyConsentManager.sharedInstance.consentForPushNotifications), + kCountlyReservedEventView: @(CountlyConsentManager.sharedInstance.consentForViewTracking), + }; + + NSNumber* aReservedEvent = reservedEvents[key]; + return aReservedEvent.boolValue; +} + #pragma mark - - (void)startEvent:(NSString *)key diff --git a/ios/Classes/CountlyiOS/Countly.podspec b/ios/Classes/CountlyiOS/Countly.podspec index 38018b17..ab6a7cba 100644 --- a/ios/Classes/CountlyiOS/Countly.podspec +++ b/ios/Classes/CountlyiOS/Countly.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Countly' - s.version = '23.02.0' + s.version = '23.02.1' s.license = { :type => 'MIT', :file => 'LICENSE.md' } s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.' s.homepage = 'https://github.com/Countly/countly-sdk-ios' diff --git a/ios/Classes/CountlyiOS/CountlyCommon.m b/ios/Classes/CountlyiOS/CountlyCommon.m index 9bd4d210..04fe7c2a 100644 --- a/ios/Classes/CountlyiOS/CountlyCommon.m +++ b/ios/Classes/CountlyiOS/CountlyCommon.m @@ -26,7 +26,7 @@ @interface CountlyCommon () #endif @end -NSString* const kCountlySDKVersion = @"23.02.0"; +NSString* const kCountlySDKVersion = @"23.02.1"; NSString* const kCountlySDKName = @"objc-native-ios"; NSString* const kCountlyErrorDomain = @"ly.count.ErrorDomain"; diff --git a/ios/Classes/CountlyiOS/CountlyConfig.m b/ios/Classes/CountlyiOS/CountlyConfig.m index 0d8f8d57..7382dfdc 100644 --- a/ios/Classes/CountlyiOS/CountlyConfig.m +++ b/ios/Classes/CountlyiOS/CountlyConfig.m @@ -49,7 +49,7 @@ - (instancetype)init self.maxKeyLength = 128; self.maxValueLength = 256; - self.maxSegmentationValues = 30; + self.maxSegmentationValues = 100; self.location = kCLLocationCoordinate2DInvalid; diff --git a/ios/Classes/CountlyiOS/CountlyEvent.h b/ios/Classes/CountlyiOS/CountlyEvent.h index d4dbe275..cb89874b 100644 --- a/ios/Classes/CountlyiOS/CountlyEvent.h +++ b/ios/Classes/CountlyiOS/CountlyEvent.h @@ -12,6 +12,7 @@ @property (nonatomic, copy) NSString* ID; @property (nonatomic, copy) NSString* CVID; @property (nonatomic, copy) NSString* PVID; +@property (nonatomic, copy) NSString* PEID; @property (nonatomic, copy) NSDictionary* segmentation; @property (nonatomic) NSUInteger count; @property (nonatomic) double sum; diff --git a/ios/Classes/CountlyiOS/CountlyEvent.m b/ios/Classes/CountlyiOS/CountlyEvent.m index 96dc7f2c..802f6049 100644 --- a/ios/Classes/CountlyiOS/CountlyEvent.m +++ b/ios/Classes/CountlyiOS/CountlyEvent.m @@ -12,6 +12,7 @@ @implementation CountlyEvent NSString* const kCountlyEventKeyID = @"id"; NSString* const kCountlyEventKeyCVID = @"cvid"; NSString* const kCountlyEventKeyPVID = @"pvid"; +NSString* const kCountlyEventKeyPEID = @"peid"; NSString* const kCountlyEventKeySegmentation = @"segmentation"; NSString* const kCountlyEventKeyCount = @"count"; NSString* const kCountlyEventKeySum = @"sum"; @@ -31,6 +32,7 @@ - (NSDictionary *)dictionaryRepresentation eventData[kCountlyEventKeyID] = self.ID; eventData[kCountlyEventKeyCVID] = self.CVID; eventData[kCountlyEventKeyPVID] = self.PVID; + eventData[kCountlyEventKeyPEID] = self.PEID; eventData[kCountlyEventKeyCount] = @(self.count); eventData[kCountlyEventKeySum] = @(self.sum); eventData[kCountlyEventKeyTimestamp] = @((long long)(self.timestamp * 1000)); @@ -48,6 +50,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder self.ID = [decoder decodeObjectForKey:NSStringFromSelector(@selector(ID))]; self.CVID = [decoder decodeObjectForKey:NSStringFromSelector(@selector(CVID))]; self.PVID = [decoder decodeObjectForKey:NSStringFromSelector(@selector(PVID))]; + self.PEID = [decoder decodeObjectForKey:NSStringFromSelector(@selector(PEID))]; self.segmentation = [decoder decodeObjectForKey:NSStringFromSelector(@selector(segmentation))]; self.count = [decoder decodeIntegerForKey:NSStringFromSelector(@selector(count))]; self.sum = [decoder decodeDoubleForKey:NSStringFromSelector(@selector(sum))]; @@ -56,7 +59,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder self.dayOfWeek = [decoder decodeIntegerForKey:NSStringFromSelector(@selector(dayOfWeek))]; self.duration = [decoder decodeDoubleForKey:NSStringFromSelector(@selector(duration))]; } - + return self; } @@ -66,6 +69,7 @@ - (void)encodeWithCoder:(NSCoder *)encoder [encoder encodeObject:self.ID forKey:NSStringFromSelector(@selector(ID))]; [encoder encodeObject:self.CVID forKey:NSStringFromSelector(@selector(CVID))]; [encoder encodeObject:self.PVID forKey:NSStringFromSelector(@selector(PVID))]; + [encoder encodeObject:self.PEID forKey:NSStringFromSelector(@selector(PEID))]; [encoder encodeObject:self.segmentation forKey:NSStringFromSelector(@selector(segmentation))]; [encoder encodeInteger:self.count forKey:NSStringFromSelector(@selector(count))]; [encoder encodeDouble:self.sum forKey:NSStringFromSelector(@selector(sum))]; diff --git a/ios/Classes/CountlyiOS/README.md b/ios/Classes/CountlyiOS/README.md index 4212a58e..3e11cefa 100644 --- a/ios/Classes/CountlyiOS/README.md +++ b/ios/Classes/CountlyiOS/README.md @@ -10,8 +10,7 @@ and [desktop](https://count.ly/desktop-analytics) applications. [Ensuring privac Track, measure, and take action - all without leaving Countly. -* **Slack user?** [Join our Slack Community](https://slack.count.ly) -* **Questions or feature requests?** [Post in our Community Forum](https://support.count.ly/hc/en-us/community/topics) +* **Questions or feature requests?** [Join the Countly Community on Discord](https://discord.gg/countly) * **Looking for the Countly Server?** [Countly Community Edition repository](https://github.com/Countly/countly-server) * **Looking for other Countly SDKs?** [An overview of all Countly SDKs for mobile, web and desktop](https://support.count.ly/hc/en-us/articles/360037236571-Downloading-and-Installing-SDKs#officially-supported-sdks) @@ -53,6 +52,6 @@ If you like Countly, [why not use one of our badges](https://count.ly/brand-asse ``` ## How can I help you with your efforts? -Glad you asked! We need ideas, feedback and constructive comments. All your suggestions will be taken care of with utmost importance. For feature requests and engaging with the community, join [our Slack Community](https://slack.count.ly) or [Community Forum](https://support.count.ly/hc/en-us/community/topics). +Glad you asked! For community support, feature requests, and engaging with the Countly Community, please join us at [our Discord Server](https://discord.gg/countly). We're excited to have you there! -We are on [Twitter](http://twitter.com/gocountly), [Facebook](https://www.facebook.com/Countly) and [LinkedIn](https://www.linkedin.com/company/countly) if you would like to keep up with Countly related updates. +Also, we are on [Twitter](https://twitter.com/gocountly) and [LinkedIn](https://www.linkedin.com/company/countly) if you would like to keep up with Countly related updates. diff --git a/ios/countly_flutter.podspec b/ios/countly_flutter.podspec index 92fd39c5..e4a5778c 100644 --- a/ios/countly_flutter.podspec +++ b/ios/countly_flutter.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'countly_flutter' - s.version = '23.2.1' + s.version = '23.2.2' s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.' s.homepage = 'https://github.com/Countly/countly-sdk-flutter-bridge' s.social_media_url = 'https://twitter.com/gocountly' diff --git a/pubspec.yaml b/pubspec.yaml index d8026595..cb316bf0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: countly_flutter description: Countly is an innovative, real-time, open source mobile analytics and push notifications platform. -version: 23.2.1 +version: 23.2.2 homepage: https://support.count.ly/hc/en-us/articles/360037944212-Flutter environment: diff --git a/scripts/no-push-files/build.gradle b/scripts/no-push-files/build.gradle index 7981236b..360f2460 100644 --- a/scripts/no-push-files/build.gradle +++ b/scripts/no-push-files/build.gradle @@ -34,5 +34,5 @@ android { } dependencies { - implementation 'ly.count.android:sdk:22.09.1' + implementation 'ly.count.android:sdk:22.09.3' } diff --git a/scripts/no-push-files/countly_flutter_np.podspec b/scripts/no-push-files/countly_flutter_np.podspec index 6319a464..acf4cea9 100644 --- a/scripts/no-push-files/countly_flutter_np.podspec +++ b/scripts/no-push-files/countly_flutter_np.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'countly_flutter_np' - s.version = '23.2.1' + s.version = '23.2.2' s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.' s.homepage = 'https://github.com/Countly/countly-sdk-flutter-bridge' s.social_media_url = 'https://twitter.com/gocountly' diff --git a/scripts/no-push-files/pubspec.yaml b/scripts/no-push-files/pubspec.yaml index f77ff22d..33d3142d 100644 --- a/scripts/no-push-files/pubspec.yaml +++ b/scripts/no-push-files/pubspec.yaml @@ -1,6 +1,6 @@ name: countly_flutter_np description: Countly is an innovative, real-time, open source mobile analytics. This plugin is a flavour of the SDK without push notifications. -version: 23.2.1 +version: 23.2.2 homepage: https://support.count.ly/hc/en-us/articles/360037944212-Flutter environment: