diff --git a/CHANGELOG.md b/CHANGELOG.md index da3cf495f..4a57e79c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The changelog for `SuperwallKit`. Also see the [releases](https://github.com/sup ### Enhancements +- Adds `singularDeviceId` as an `IntegrationAttribute`. - Adds support for annual subscriptions that are billed monthly. - Added `EventTrackingBehavior` enum and `SuperwallOptions.eventTrackingBehavior` property for GDPR-compliant event collection control. Use `.all` (default) to track everything, `.superwallOnly` to suppress user-initiated tracking, trigger fires, and user-attribute updates while keeping internal SDK events, or `.none` to stop all event collection entirely. The behavior can also be changed at runtime via `Superwall.shared.eventTrackingBehavior`. - Deprecated `SuperwallOptions.isExternalDataCollectionEnabled`. Setting it to `false` now maps to `.superwallOnly`; setting it back to `true` maps to `.all`. diff --git a/Sources/SuperwallKit/Analytics/Attribution/IntegrationAttribute.swift b/Sources/SuperwallKit/Analytics/Attribution/IntegrationAttribute.swift index 683156562..29603c987 100644 --- a/Sources/SuperwallKit/Analytics/Attribution/IntegrationAttribute.swift +++ b/Sources/SuperwallKit/Analytics/Attribution/IntegrationAttribute.swift @@ -73,6 +73,9 @@ public enum IntegrationAttribute: Int { /// The Appstack identifier. case appstackId + + /// The Singular device identifier (SDID). + case singularDeviceId } // MARK: - CustomStringConvertible @@ -123,6 +126,8 @@ extension IntegrationAttribute: CustomStringConvertible { return "customerioId" case .appstackId: return "appstackId" + case .singularDeviceId: + return "singularDeviceId" } } } diff --git a/Tests/SuperwallKitTests/Analytics/Attribution/AttributionTests.swift b/Tests/SuperwallKitTests/Analytics/Attribution/AttributionTests.swift index 330513e74..a5bd749f5 100644 --- a/Tests/SuperwallKitTests/Analytics/Attribution/AttributionTests.swift +++ b/Tests/SuperwallKitTests/Analytics/Attribution/AttributionTests.swift @@ -348,7 +348,8 @@ struct AttributionTests { .tenjinId: "tenjin-id", .posthogUserId: "posthog-user-id", .customerioId: "customerio-id", - .appstackId: "appstack-id" + .appstackId: "appstack-id", + .singularDeviceId: "singular-device-id" ] // When @@ -378,6 +379,7 @@ struct AttributionTests { #expect(storedProps["posthogUserId"] as? String == "posthog-user-id") #expect(storedProps["customerioId"] as? String == "customerio-id") #expect(storedProps["appstackId"] as? String == "appstack-id") + #expect(storedProps["singularDeviceId"] as? String == "singular-device-id") } }