diff --git a/Sources/BraintreeCore/Analytics/FPTIBatchData.swift b/Sources/BraintreeCore/Analytics/FPTIBatchData.swift index f83186ca0..de6186dba 100644 --- a/Sources/BraintreeCore/Analytics/FPTIBatchData.swift +++ b/Sources/BraintreeCore/Analytics/FPTIBatchData.swift @@ -43,8 +43,6 @@ struct FPTIBatchData: Codable { let endTime: Int? let errorDescription: String? let eventName: String - /// The experiment type that is sent to analytics to help improve the Shopper Insights feature experience. - let experimentType: String? /// True if the `BTConfiguration` was retrieved from local cache after `tokenize()` call. /// False if the `BTConfiguration` was fetched remotely after `tokenize()` call. let isConfigFromCache: Bool? @@ -81,7 +79,6 @@ struct FPTIBatchData: Codable { endTime: Int? = nil, errorDescription: String? = nil, eventName: String, - experimentType: String? = nil, isConfigFromCache: Bool? = nil, isVaultRequest: Bool? = nil, linkType: String? = nil, @@ -102,7 +99,6 @@ struct FPTIBatchData: Codable { self.endTime = endTime self.errorDescription = errorDescription self.eventName = eventName - self.experimentType = experimentType self.isConfigFromCache = isConfigFromCache self.isVaultRequest = isVaultRequest self.linkType = linkType @@ -123,7 +119,6 @@ struct FPTIBatchData: Codable { case correlationID = "correlation_id" case errorDescription = "error_desc" case eventName = "event_name" - case experimentType = "experiment_type" case isConfigFromCache = "config_cached" case isVaultRequest = "is_vault" case linkType = "link_type" diff --git a/Sources/BraintreeCore/BTAPIClient.swift b/Sources/BraintreeCore/BTAPIClient.swift index 4d6abbc55..12f5ff794 100644 --- a/Sources/BraintreeCore/BTAPIClient.swift +++ b/Sources/BraintreeCore/BTAPIClient.swift @@ -308,11 +308,10 @@ import Foundation buttonType: String? = nil, correlationID: String? = nil, errorDescription: String? = nil, - experimentType: String? = nil, - merchantExperiment: String? = nil, isConfigFromCache: Bool? = nil, isVaultRequest: Bool? = nil, linkType: LinkType? = nil, + merchantExperiment: String? = nil, pageType: String? = nil, paymentMethodsDisplayed: String? = nil, payPalContextID: String? = nil, @@ -326,7 +325,6 @@ import Foundation correlationID: correlationID, errorDescription: errorDescription, eventName: eventName, - experimentType: experimentType, isConfigFromCache: isConfigFromCache, isVaultRequest: isVaultRequest, linkType: linkType?.rawValue, diff --git a/Sources/BraintreeShopperInsights/BTShopperInsightsClient.swift b/Sources/BraintreeShopperInsights/BTShopperInsightsClient.swift index fe7327dca..81baab11c 100644 --- a/Sources/BraintreeShopperInsights/BTShopperInsightsClient.swift +++ b/Sources/BraintreeShopperInsights/BTShopperInsightsClient.swift @@ -101,7 +101,7 @@ public class BTShopperInsightsClient { BTShopperInsightsAnalytics.buttonPresented, buttonOrder: presentmentDetails.buttonOrder.rawValue, buttonType: buttonType.rawValue, - experimentType: presentmentDetails.experimentType.formattedExperiment, + merchantExperiment: presentmentDetails.experimentType.formattedExperiment, pageType: presentmentDetails.pageType.rawValue, shopperSessionID: shopperSessionID ) diff --git a/UnitTests/BraintreeShopperInsightsTests/BTShopperInsightsClient_Tests.swift b/UnitTests/BraintreeShopperInsightsTests/BTShopperInsightsClient_Tests.swift index 58d5effe3..d5583b21e 100644 --- a/UnitTests/BraintreeShopperInsightsTests/BTShopperInsightsClient_Tests.swift +++ b/UnitTests/BraintreeShopperInsightsTests/BTShopperInsightsClient_Tests.swift @@ -216,7 +216,7 @@ class BTShopperInsightsClient_Tests: XCTestCase { XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.first, "shopper-insights:button-presented") XCTAssertEqual(mockAPIClient.postedButtonOrder, 0) XCTAssertEqual(mockAPIClient.postedButtonType, "PayPal") - XCTAssertEqual(mockAPIClient.postedExperimentType, + XCTAssertEqual(mockAPIClient.postedMerchantExperiment, """ [ { "exp_name" : "PaymentReady" } @@ -242,7 +242,7 @@ class BTShopperInsightsClient_Tests: XCTestCase { XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.first, "shopper-insights:button-presented") XCTAssertEqual(mockAPIClient.postedButtonOrder, 0) XCTAssertEqual(mockAPIClient.postedButtonType, "Venmo") - XCTAssertEqual(mockAPIClient.postedExperimentType, + XCTAssertEqual(mockAPIClient.postedMerchantExperiment, """ [ { "exp_name" : "PaymentReady" } diff --git a/UnitTests/BraintreeTestShared/MockAPIClient.swift b/UnitTests/BraintreeTestShared/MockAPIClient.swift index aa1ee24be..79c75c57b 100644 --- a/UnitTests/BraintreeTestShared/MockAPIClient.swift +++ b/UnitTests/BraintreeTestShared/MockAPIClient.swift @@ -15,7 +15,6 @@ public class MockAPIClient: BTAPIClient { public var postedAppSwitchURL: [String: String?] = [:] public var postedButtonOrder: Int? = nil public var postedButtonType: String? = nil - public var postedExperimentType: String? = nil public var postedIsVaultRequest = false public var postedLinkType: LinkType? = nil public var postedMerchantExperiment: String? = nil @@ -103,11 +102,10 @@ public class MockAPIClient: BTAPIClient { buttonType: String? = nil, correlationID: String? = nil, errorDescription: String? = nil, - experimentType: String? = nil, - merchantExperiment experiment: String? = nil, isConfigFromCache: Bool? = nil, isVaultRequest: Bool? = nil, linkType: LinkType? = nil, + merchantExperiment experiment: String? = nil, pageType: String? = nil, paymentMethodsDisplayed: String? = nil, payPalContextID: String? = nil, @@ -115,7 +113,6 @@ public class MockAPIClient: BTAPIClient { ) { postedButtonType = buttonType postedButtonOrder = buttonOrder - postedExperimentType = experimentType postedPageType = pageType postedPayPalContextID = payPalContextID postedLinkType = linkType