Enrich Accept dispute tracks events with dispute identifiers#11599
Draft
dmallory42 wants to merge 1 commit intodevelopfrom
Draft
Enrich Accept dispute tracks events with dispute identifiers#11599dmallory42 wants to merge 1 commit intodevelopfrom
dmallory42 wants to merge 1 commit intodevelopfrom
Conversation
…tifiers Context: Dispute acceptance currently fires `wcpay_dispute_accept_modal_view` on the initial click and `wcpay_dispute_accept_click` on confirmation (plus the inquiry refund equivalents), but each payload only carries the dispute status and a page marker. That's not enough to join the events back to the dispute records they describe, so we can't segment the "lost without evidence" population by who actively chose to accept versus who never engaged at all. Problem: Without the dispute ID, analytics cannot link a click to a specific dispute outcome. Without the reason, we cannot slice drop-off between the modal open and the confirm click by dispute reason, which is the primary dimension product decisions hinge on. Solution: Add `dispute_id` and `dispute_reason` to both the open-modal and confirm-click events, for both the standard accept flow and the inquiry refund flow. Tests now assert the full payload shape so the fields won't be removed silently. Refs WOOPMNT-6101
Contributor
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Contributor
|
Size Change: +13 B (0%) Total Size: 963 kB
ℹ️ View Unchanged
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs WOOPMNT-6101
Changes proposed in this Pull Request
Enriches the existing "Accept dispute" Tracks events with additional properties so that click data can be joined back to specific dispute records and segmented by reason.
The four affected events are:
wcpay_dispute_accept_modal_view— fired when the merchant clicks "Accept dispute" and opens the confirmation modal.wcpay_dispute_accept_click— fired when the merchant confirms acceptance from within the modal.wcpay_dispute_inquiry_refund_modal_view— inquiry equivalent of the above.wcpay_dispute_inquiry_refund_click— inquiry equivalent of the above.Each event payload now includes
dispute_idanddispute_reasonin addition to the existingdispute_statusandon_page. No new events are introduced and no existing properties are removed.Testing instructions
Automated:
npm run test:js -- client/payment-details/dispute-details/__tests__/dispute-awaiting-response-details.test.tsxManual:
tracks, click Accept dispute. Verifywcpay_dispute_accept_modal_viewfires withdispute_id,dispute_status,dispute_reason, andon_page.wcpay_dispute_accept_clickfires with the same four properties.credit_not_processed). The Issue refund flow should firewcpay_dispute_inquiry_refund_modal_viewandwcpay_dispute_inquiry_refund_clickwith the enriched payload.npm run changelogto add a changelog file, choosepatchto leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge