Skip to content

Commit caad8d8

Browse files
committed
Update analytics
1 parent 87009fc commit caad8d8

File tree

1 file changed

+9
-2
lines changed
  • UIComponents/src/main/java/com/braintreepayments/api/uicomponents

1 file changed

+9
-2
lines changed

UIComponents/src/main/java/com/braintreepayments/api/uicomponents/VenmoButton.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.activity.result.ActivityResultCaller
1212
import androidx.appcompat.widget.AppCompatButton
1313
import androidx.core.content.ContextCompat
1414
import com.braintreepayments.api.core.AnalyticsClient
15+
import com.braintreepayments.api.core.AnalyticsEventParams
1516
import com.braintreepayments.api.uicomponents.VenmoButtonColor.Companion.fromId
1617
import com.braintreepayments.api.venmo.VenmoClient
1718
import com.braintreepayments.api.venmo.VenmoLauncher
@@ -101,7 +102,10 @@ class VenmoButton @JvmOverloads constructor(
101102
)
102103

103104
val analyticsClient = AnalyticsClient.lazyInstance.value
104-
analyticsClient.sendEvent(UIComponentsAnalytics.VENMO_BUTTON_PRESENTED)
105+
analyticsClient.sendEvent(
106+
UIComponentsAnalytics.VENMO_BUTTON_PRESENTED,
107+
AnalyticsEventParams(uiType = UIComponentsAnalytics.UI_TYPE_XML_VIEW)
108+
)
105109
}
106110

107111
/**
@@ -145,7 +149,10 @@ class VenmoButton @JvmOverloads constructor(
145149
private fun completeVenmoFlow(venmoPaymentAuthRequest: VenmoPaymentAuthRequest.ReadyToLaunch) {
146150
getActivity()?.let { activity ->
147151
val analyticsClient = AnalyticsClient.lazyInstance.value
148-
analyticsClient.sendEvent(UIComponentsAnalytics.VENMO_BUTTON_SELECTED)
152+
analyticsClient.sendEvent(
153+
UIComponentsAnalytics.VENMO_BUTTON_SELECTED,
154+
AnalyticsEventParams(uiType = UIComponentsAnalytics.UI_TYPE_XML_VIEW)
155+
)
149156
val venmoPendingRequest = venmoLauncher.launch(
150157
activity = activity,
151158
paymentAuthRequest = venmoPaymentAuthRequest

0 commit comments

Comments
 (0)