Skip to content

Commit

Permalink
fix: Fix correlationId key on PayPal click event
Browse files Browse the repository at this point in the history
  • Loading branch information
julianajlk committed Nov 8, 2024
1 parent 38be6ab commit 64ff687
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/payment/data/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ export const TRACK_PAYMENT_BUTTON_CLICK = 'TRACK_PAYMENT_BUTTON_CLICK';
export const trackPaymentButtonClick = tagularElement => {
// Ideally this would happen in a middleware saga for separation of concerns
// but due to deadlines/payment MFE will go away, adding a call here.
// Note: Click events on the PayPal button and Place Order button differ in the type of event data it's treated as.
// Note: Click events on the PayPal button and Place Order button differ in the type of event data,
// and correlation vs. correlationId sent.
let payload;
if (tagularElement.name === 'paypal') {
payload = {
correlation: {
id: getCorrelationID(),
},
correlationId: getCorrelationID(),
webElement: tagularElement,
};
tagularEvent('ElementClicked', payload);
Expand Down

0 comments on commit 64ff687

Please sign in to comment.