File tree Expand file tree Collapse file tree 2 files changed +7
-20
lines changed
app/pay/components/client Expand file tree Collapse file tree 2 files changed +7
-20
lines changed Original file line number Diff line number Diff line change @@ -435,11 +435,8 @@ export function reportPaymentLinkCreated(properties: {
435435 * ### Who is responsible for this event?
436436 * @greg
437437 */
438- export function reportPaymentLinkBuySuccessful ( properties : {
439- linkId : string ;
440- clientId : string ;
441- } ) {
442- posthog . capture ( "payment link buy successful" , properties ) ;
438+ export function reportPaymentLinkBuySuccessful ( ) {
439+ posthog . capture ( "payment link buy successful" ) ;
443440}
444441
445442/**
@@ -451,8 +448,6 @@ export function reportPaymentLinkBuySuccessful(properties: {
451448 * @greg
452449 */
453450export function reportPaymentLinkBuyFailed ( properties : {
454- linkId : string ;
455- clientId : string ;
456451 errorMessage : string ;
457452} ) {
458453 posthog . capture ( "payment link buy failed" , properties ) ;
Original file line number Diff line number Diff line change @@ -62,24 +62,16 @@ export function PayPageWidget({
6262 image = { image }
6363 name = { name }
6464 onSuccess = { ( ) => {
65+ reportPaymentLinkBuySuccessful ( ) ;
66+
6567 if ( ! redirectUri ) return ;
6668 const url = new URL ( redirectUri ) ;
67- if ( paymentLinkId && clientId ) {
68- reportPaymentLinkBuySuccessful ( {
69- linkId : paymentLinkId ,
70- clientId : clientId ,
71- } ) ;
72- }
7369 return window . open ( url . toString ( ) ) ;
7470 } }
7571 onError = { ( error ) => {
76- if ( paymentLinkId && clientId ) {
77- reportPaymentLinkBuyFailed ( {
78- linkId : paymentLinkId ,
79- clientId : clientId ,
80- errorMessage : error . message ,
81- } ) ;
82- }
72+ reportPaymentLinkBuyFailed ( {
73+ errorMessage : error . message ,
74+ } ) ;
8375 } }
8476 paymentLinkId = { paymentLinkId }
8577 purchaseData = { purchaseData }
You can’t perform that action at this time.
0 commit comments