diff --git a/Adyen/Core/Core Protocols/PresentableComponent.swift b/Adyen/Core/Core Protocols/PresentableComponent.swift index c0747d51c6..c3478c607c 100644 --- a/Adyen/Core/Core Protocols/PresentableComponent.swift +++ b/Adyen/Core/Core Protocols/PresentableComponent.swift @@ -70,8 +70,6 @@ public protocol TrackableComponent: Component { extension TrackableComponent where Self: ViewControllerDelegate { public func viewWillAppear(viewController: UIViewController) { - // initial call is not needed again if inside dropIn -// guard !_isDropIn else { return } sendInitialAnalytics() } } @@ -80,6 +78,8 @@ extension TrackableComponent where Self: ViewControllerDelegate { extension TrackableComponent where Self: PaymentMethodAware { public func sendInitialAnalytics() { + // initial call is not needed again if inside dropIn + guard !_isDropIn else { return } let flavor: TelemetryFlavor = .components(type: paymentMethod.type) let amount = context.payment?.amount let additionalFields = AdditionalAnalyticsFields(amount: amount, sessionId: AdyenAnalytics.sessionId) diff --git a/AdyenComponents/BACS Direct Debit/Trackers/BACSDirectDebitComponentTracker.swift b/AdyenComponents/BACS Direct Debit/Trackers/BACSDirectDebitComponentTracker.swift index 2cb168a87e..78ff9fd423 100644 --- a/AdyenComponents/BACS Direct Debit/Trackers/BACSDirectDebitComponentTracker.swift +++ b/AdyenComponents/BACS Direct Debit/Trackers/BACSDirectDebitComponentTracker.swift @@ -32,6 +32,8 @@ internal class BACSDirectDebitComponentTracker: BACSDirectDebitComponentTrackerP // MARK: - BACSDirectDebitComponentTrackerProtocol internal func sendInitialAnalytics() { + // initial call is not needed again if inside dropIn + guard !isDropIn else { return } let flavor: TelemetryFlavor = .components(type: paymentMethod.type) let amount = context.payment?.amount let additionalFields = AdditionalAnalyticsFields(amount: amount, sessionId: AdyenAnalytics.sessionId)