Skip to content

Commit

Permalink
Disputes: Use existing tracks events where possible (#7402)
Browse files Browse the repository at this point in the history
Co-authored-by: Shendy <[email protected]>
  • Loading branch information
brucealdridge and shendy-a8c authored Oct 8, 2023
1 parent c1f7b63 commit 703835a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
5 changes: 5 additions & 0 deletions changelog/fix-7395
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Updating tracks events


Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ const DisputeAwaitingResponseDetails: React.FC< Props > = ( {
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.DISPUTE_CHALLENGE_CLICK,
.DISPUTE_CHALLENGE_CLICKED,
{
dispute_status: dispute.status,
on_page: 'transaction_details',
}
);
} }
Expand All @@ -279,6 +280,7 @@ const DisputeAwaitingResponseDetails: React.FC< Props > = ( {
disputeAcceptAction.acceptButtonTracksEvent,
{
dispute_status: dispute.status,
on_page: 'transaction_details',
}
);
setModalOpen( true );
Expand Down Expand Up @@ -337,6 +339,8 @@ const DisputeAwaitingResponseDetails: React.FC< Props > = ( {
{
dispute_status:
dispute.status,
on_page:
'transaction_details',
}
);
setModalOpen( false );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ const DisputeUnderReviewFooter: React.FC< {
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICKED,
{
dispute_status: dispute.status,
on_page: 'transaction_details',
}
);
} }
Expand Down Expand Up @@ -141,9 +142,10 @@ const DisputeWonFooter: React.FC< {
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICKED,
{
dispute_status: dispute.status,
on_page: 'transaction_details',
}
);
} }
Expand Down Expand Up @@ -250,9 +252,10 @@ const DisputeLostFooter: React.FC< {
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICKED,
{
dispute_status: dispute.status,
on_page: 'transaction_details',
}
);
} }
Expand Down Expand Up @@ -322,9 +325,10 @@ const InquiryUnderReviewFooter: React.FC< {
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICKED,
{
dispute_status: dispute.status,
on_page: 'transaction_details',
}
);
} }
Expand Down Expand Up @@ -396,9 +400,10 @@ const InquiryClosedFooter: React.FC< {
onClick={ () => {
wcpayTracks.recordEvent(
wcpayTracks.events
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK,
.PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICKED,
{
dispute_status: dispute.status,
on_page: 'transaction_details',
}
);
} }
Expand Down
6 changes: 3 additions & 3 deletions client/tracks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const events = {
DEPOSITS_ROW_CLICK: 'wcpay_deposits_row_click',
DEPOSITS_DOWNLOAD_CSV_CLICK: 'wcpay_deposits_download',
DISPUTES_ROW_ACTION_CLICK: 'wcpay_disputes_row_action_click',
DISPUTE_CHALLENGE_CLICK: 'wcpay_dispute_challenge_click',
DISPUTE_CHALLENGE_CLICKED: 'wcpay_dispute_challenge_clicked',
DISPUTE_ACCEPT_CLICK: 'wcpay_dispute_accept_click',
DISPUTE_ACCEPT_MODAL_VIEW: 'wcpay_dispute_accept_modal_view',
DISPUTE_INQUIRY_REFUND_CLICK: 'wcpay_dispute_inquiry_refund_click',
Expand All @@ -83,8 +83,8 @@ const events = {
OVERVIEW_DEPOSITS_CHANGE_SCHEDULE_CLICK:
'wcpay_overview_deposits_change_schedule_click',
OVERVIEW_TASK_CLICK: 'wcpay_overview_task_click',
PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICK:
'wcpay_payment_details_view_dispute_evidence_button_click',
PAYMENT_DETAILS_VIEW_DISPUTE_EVIDENCE_BUTTON_CLICKED:
'wcpay_view_submitted_evidence_clicked',
SETTINGS_DEPOSITS_MANAGE_IN_STRIPE_CLICK:
'wcpay_settings_deposits_manage_in_stripe_click',
MULTI_CURRENCY_ENABLED_CURRENCIES_UPDATED:
Expand Down

0 comments on commit 703835a

Please sign in to comment.