Skip to content

Commit

Permalink
fix: Feedback edits
Browse files Browse the repository at this point in the history
  • Loading branch information
julianajlk committed Nov 5, 2024
1 parent c2be3c1 commit 25a7891
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/cohesion/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const EventMap = {
FieldSelected: 'redventures.usertracking.v3.FieldSelected',
FormSubmitted: 'redventures.usertracking.v3.FormSubmitted',
FormViewed: 'redventures.usertracking.v3.FormViewed',
ConversionTracked: 'core.conversions.ConversionTracked.v2',
};

export const IS_FULLY_SHOWN_THRESHOLD_OR_MARGIN = 1.0;
Expand Down
9 changes: 0 additions & 9 deletions src/cohesion/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ export const tagularEvent = (eventName, eventData) => {
}
};

export function pageTrackingObject(pageType) {
return {
title: window.document.title,
url: window.location.href,
pageType,
referrer: window.document.referrer,
};
}

/**
* Make Near Slugs from Plain Strings for ease of eventing.
* @example
Expand Down
7 changes: 3 additions & 4 deletions src/payment/data/actions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createRoutine } from 'redux-saga-routines';
import { EventMap } from '../../cohesion/constants';
import { getCorrelationID, tagularEvent } from '../../cohesion/helpers';

// Routines are action + action creator pairs in a series.
Expand Down Expand Up @@ -88,7 +87,7 @@ export const trackPaymentButtonClick = tagularElement => {
},
metadata: tagularElement,
};
tagularEvent(EventMap.ElementClicked, conversionEvent);
tagularEvent('ConversionTracked', conversionEvent);

return {
type: TRACK_PAYMENT_BUTTON_CLICK,
Expand All @@ -106,9 +105,9 @@ export const trackElementIntersection = tagularElement => {
// so only add the correlation ID if this is a viewed from the coupon application click
const viewedEvent = {
...(tagularElement.name === 'promotional-code' ? { correlation: { id: getCorrelationID() } } : null),
metadata: tagularElement,
webElement: tagularElement,
};
tagularEvent(EventMap.ElementViewed, viewedEvent);
tagularEvent('ElementViewed', viewedEvent);

return {
type: TRACK_ELEMENT_INTERSECTION,
Expand Down

0 comments on commit 25a7891

Please sign in to comment.