Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions apps/dashboard/src/@/analytics/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,8 @@ export function reportPaymentLinkCreated(properties: {
* ### Who is responsible for this event?
* @greg
*/
export function reportPaymentLinkBuySuccessful(properties: {
linkId: string;
clientId: string;
}) {
posthog.capture("payment link buy successful", properties);
export function reportPaymentLinkBuySuccessful() {
posthog.capture("payment link buy successful");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want the payment details in here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - its not important

}

/**
Expand All @@ -451,8 +448,6 @@ export function reportPaymentLinkBuySuccessful(properties: {
* @greg
*/
export function reportPaymentLinkBuyFailed(properties: {
linkId: string;
clientId: string;
errorMessage: string;
}) {
posthog.capture("payment link buy failed", properties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,16 @@ export function PayPageWidget({
image={image}
name={name}
onSuccess={() => {
reportPaymentLinkBuySuccessful();

if (!redirectUri) return;
const url = new URL(redirectUri);
if (paymentLinkId && clientId) {
reportPaymentLinkBuySuccessful({
linkId: paymentLinkId,
clientId: clientId,
});
}
return window.open(url.toString());
}}
onError={(error) => {
if (paymentLinkId && clientId) {
reportPaymentLinkBuyFailed({
linkId: paymentLinkId,
clientId: clientId,
errorMessage: error.message,
});
}
reportPaymentLinkBuyFailed({
errorMessage: error.message,
});
}}
paymentLinkId={paymentLinkId}
purchaseData={purchaseData}
Expand Down
Loading