feat: add provider_onramp property to Ramps Transaction Completed/Failed events#25618
feat: add provider_onramp property to Ramps Transaction Completed/Failed events#25618
Conversation
…led events - Add provider_onramp field to RampsTransactionCompleted and RampsTransactionFailed analytics interfaces - Include provider_onramp in getDepositAnalyticsPayload function from order.provider - Update mock data to include provider field - Update all test expectations to include provider_onramp property This aligns the deposit/native orders analytics with the aggregator orders which already have provider_onramp, allowing for better analysis in Mixpanel custom events. Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
SonarCloud Quality Gate Failure - Expected The SonarCloud quality gate is failing due to
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The changes are additive and don't modify any user-facing functionality or transaction flows. The unit tests have been updated to cover the new analytics field. While the risk is low, selecting SmokeRamps provides a safety net to verify that the on-ramp/deposit flows still work correctly with the analytics changes, especially since analytics events are validated in some E2E tests. Performance Test Selection: |
|


Description
This PR adds the
provider_onrampproperty to the "Ramps Transaction Completed" and "Ramps Transaction Failed" analytics events for deposit/native orders.Problem:
The Ramps Transaction Completed event does not have the
provider_onrampproperty, while the On-ramp Purchase Completed event does have this field. When creating a custom Mixpanel event that combines both events for analysis,(not set)dominates the results because of the larger volume of native orders without this property.Solution:
provider_onramp: stringfield toRampsTransactionCompletedandRampsTransactionFailedanalytics interfacesgetDepositAnalyticsPayloadfunction to includeprovider_onrampfromorder.provider(defaults to empty string if not present)provider_onramppropertyThis aligns the deposit/native orders analytics with the aggregator orders which already have
provider_onramp, allowing for better analysis in Mixpanel custom events.Files Changed:
app/components/UI/Ramp/Deposit/types/analytics.ts- Addedprovider_onrampto interfacesapp/components/UI/Ramp/Deposit/utils/getDepositAnalyticsPayload.ts- Added property extraction fromorder.providerapp/components/UI/Ramp/Deposit/testUtils/constants.ts- Updated mock dataapp/components/UI/Ramp/Deposit/utils/getDepositAnalyticsPayload.test.ts- Updated all test expectationsChangelog
CHANGELOG entry: null
Related issues
Refs: Issue created in Slack from a message
Related PR: Consensys/segment-schema#447 (adds
provider_onrampto Segment tracking plan)Manual testing steps
Note: Manual testing requires completing a real deposit order (requires funds). Unit tests verify the property is correctly included in analytics payloads (11/11 tests pass).
Screenshots/Recordings
Before
N/A - Analytics change only
After
N/A - Analytics change only
Pre-merge author checklist
provider_onrampproperty inclusion)Pre-merge reviewer checklist
Note
Low Risk
Low risk: analytics-only payload/type changes for deposit completion/failure events; main risk is downstream consumers expecting the previous schema.
Overview
Adds
provider_onrampto deposit analytics forRAMPS_TRANSACTION_COMPLETEDandRAMPS_TRANSACTION_FAILED, populating it fromorder.provider(defaulting to an empty string when missing).Updates the corresponding TypeScript analytics event interfaces plus deposit test fixtures and unit test expectations to validate the new field is emitted.
Written by Cursor Bugbot for commit 5031b78. This will update automatically on new commits. Configure here.