Skip to content

Commit df8b07d

Browse files
KM-17457: Report IAP KPI metrics for login-with-receipt
The login-with-receipt path verifies an IAP receipt against Kape but emitted no IAP processing events. It is reached from the iOS restore flow, the iOS login screen and tvOS login, so those verifications went unreported. Emit purchase/success/failure around the token(receipt:) call using the existing event set and the .signup origin, matching how the signup login-with-receipt fallback already reports the same verification.
1 parent 144f442 commit df8b07d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

LocalPackages/PIALibrary/Sources/PIALibrary/Account/DefaultAccountProvider.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,14 @@ public final class DefaultAccountProvider: AccountProvider, ConfigurationAccess,
177177

178178
Task { @MainActor in
179179
let credentials = Credentials(username: "", password: "")
180+
ServiceQualityManager.shared.iapProcessingPurchaseEvent(origin: .signup)
180181

181182
do {
182183
try await webServices.token(receipt: receiptRequest.receipt)
184+
ServiceQualityManager.shared.iapProcessingSuccessEvent(origin: .signup)
183185
self.handleLoginResult(error: nil, credentials: credentials, callback: callback)
184186
} catch {
187+
ServiceQualityManager.shared.iapProcessingFailureEvent(origin: .signup, error: error)
185188
self.handleLoginResult(error: error, credentials: credentials, callback: callback)
186189
}
187190
}

0 commit comments

Comments
 (0)