diff --git a/public/index.html b/public/index.html
index 1fa3e1a92..369991021 100755
--- a/public/index.html
+++ b/public/index.html
@@ -37,7 +37,7 @@
writeKey: '<%= htmlWebpackPlugin?.options?.cohesionConfig?.tagularWriteKey %>',
sourceKey: '<%= htmlWebpackPlugin?.options?.cohesionConfig?.tagularSourceKey %>',
cookieDomain: '<%= htmlWebpackPlugin?.options?.cohesionConfig?.tagularCookieDomain %>',
- domainWhitelist: `<%= htmlWebpackPlugin?.options?.cohesionConfig?.tagularDomainWhitelist %>`,
+ domainWhitelist: <%= htmlWebpackPlugin?.options?.cohesionConfig?.tagularDomainWhitelist %>,
apiVersion: 'v2/t',
multiparty: true,
taggy: { enabled: true },
diff --git a/src/feedback/AlertMessage.jsx b/src/feedback/AlertMessage.jsx
index 120f6c65e..5b26874b3 100644
--- a/src/feedback/AlertMessage.jsx
+++ b/src/feedback/AlertMessage.jsx
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
import { Alert } from '@openedx/paragon';
import { ALERT_TYPES, MESSAGE_TYPES } from './data/constants';
import { trackElementIntersection } from '../payment/data/actions';
-import { ElementType, PageData, IS_FULLY_SHOWN_THRESHOLD_OR_MARGIN } from '../cohesion/constants';
+import { ElementType, IS_FULLY_SHOWN_THRESHOLD_OR_MARGIN } from '../cohesion/constants';
// Put in a message type, get an alert type.
const severityMap = {
@@ -31,9 +31,6 @@ const AlertMessage = (props) => {
entries.forEach(entry => {
if (entry.isIntersecting && entry.target?.innerText.includes('added to basket')) {
const tagularElement = {
- title: PageData.PaymentTitle,
- url: entry.target?.baseURI,
- pageType: PageData.PageType,
elementType: ElementType.Button,
name: 'promotional-code',
text: 'Apply',
diff --git a/src/payment/checkout/Checkout.jsx b/src/payment/checkout/Checkout.jsx
index 95781224c..b9ee6dff7 100644
--- a/src/payment/checkout/Checkout.jsx
+++ b/src/payment/checkout/Checkout.jsx
@@ -73,9 +73,6 @@ class Checkout extends React.Component {
// Red Ventures Cohesion Tagular Event Tracking for PayPal
const tagularElement = {
- title: PageData.PaymentTitle,
- url: window.location.href,
- pageType: PageData.PageType,
elementType: ElementType.Button,
text: paymentMethod,
name: paymentMethod.toLowerCase(),
@@ -131,10 +128,7 @@ class Checkout extends React.Component {
handleSubmitStripe = (formData) => {
// Red Ventures Cohesion Tagular Event Tracking for Stripe
const tagularElement = {
- title: PageData.PaymentTitle,
- url: window.location.href,
- pageType: PageData.PageType,
- timestamp: Date.now(),
+ timestamp: Date.now().toString(),
productList: this.getProductList(),
};
diff --git a/src/payment/checkout/payment-form/PlaceOrderButton.jsx b/src/payment/checkout/payment-form/PlaceOrderButton.jsx
index aea91c116..7367bca2b 100644
--- a/src/payment/checkout/payment-form/PlaceOrderButton.jsx
+++ b/src/payment/checkout/payment-form/PlaceOrderButton.jsx
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
import { StatefulButton } from '@openedx/paragon';
import { trackElementIntersection } from '../../data/actions';
-import { ElementType, PageData, IS_FULLY_SHOWN_THRESHOLD_OR_MARGIN } from '../../../cohesion/constants';
+import { ElementType, IS_FULLY_SHOWN_THRESHOLD_OR_MARGIN } from '../../../cohesion/constants';
const PlaceOrderButton = ({
showLoadingButton, onSubmitButtonClick, stripeSelectedPaymentMethod, disabled, isProcessing,
@@ -24,9 +24,6 @@ const PlaceOrderButton = ({
entries.forEach(entry => {
if (entry.isIntersecting) {
const tagularElement = {
- title: PageData.PaymentTitle,
- url: window.location.href,
- pageType: PageData.PageType,
elementType: ElementType.Button,
position: 'placeOrderButton',
name: 'stripe',
diff --git a/src/payment/data/actions.js b/src/payment/data/actions.js
index 30674560a..5a4100b2f 100644
--- a/src/payment/data/actions.js
+++ b/src/payment/data/actions.js
@@ -115,9 +115,7 @@ export const trackElementIntersection = tagularElement => {
// Note: For the coupon code banner, we're using an elementViewed as a click event
// ('BUTTON' on coupon Apply click, but it's when the banner is viewed).
const viewedEvent = {
- correlation: {
- id: getCorrelationID(),
- },
+ correlationId: getCorrelationID(),
webElement: tagularElement,
};
tagularEvent('ElementViewed', viewedEvent);
diff --git a/src/payment/data/sagas.js b/src/payment/data/sagas.js
index 7633caf01..a85c86113 100644
--- a/src/payment/data/sagas.js
+++ b/src/payment/data/sagas.js
@@ -241,8 +241,8 @@ export function* handleSubmitPayment({ payload }) {
// Metada for conversion_category and conversion_action:
// Sucessful payment = 'Order' and 'Completed'
// Failed payment = 'Enrollment' and 'Declined'
- tagularElement.conversion_category = 'Order';
- tagularElement.conversion_action = 'Completed';
+ tagularElement.category = 'Order';
+ tagularElement.action = 'Completed';
yield put(trackPaymentButtonClick(tagularElement));
}
} catch (error) {
@@ -255,8 +255,8 @@ export function* handleSubmitPayment({ payload }) {
} else {
// RV tracking for failed Stripe Payment
if (method === 'stripe') {
- tagularElement.conversion_category = 'Enrollment';
- tagularElement.conversion_action = 'Declined';
+ tagularElement.category = 'Enrollment';
+ tagularElement.action = 'Declined';
yield put(trackPaymentButtonClick(tagularElement));
}
yield call(handleErrors, error, true);
diff --git a/src/payment/payment-methods/paypal/PayPalButton.jsx b/src/payment/payment-methods/paypal/PayPalButton.jsx
index ede13ca96..496dc95b1 100644
--- a/src/payment/payment-methods/paypal/PayPalButton.jsx
+++ b/src/payment/payment-methods/paypal/PayPalButton.jsx
@@ -3,7 +3,7 @@ import { useDispatch } from 'react-redux';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { trackElementIntersection } from '../../data/actions';
-import { ElementType, PageData, IS_FULLY_SHOWN_THRESHOLD_OR_MARGIN } from '../../../cohesion/constants';
+import { ElementType, IS_FULLY_SHOWN_THRESHOLD_OR_MARGIN } from '../../../cohesion/constants';
import PayPalLogo from './assets/paypal-logo.png';
import messages from './PayPalButton.messages';
@@ -19,9 +19,6 @@ const PayPalButton = ({ intl, isProcessing, ...props }) => {
if (entry.isIntersecting) {
const elementId = entry.target?.id;
const tagularElement = {
- title: PageData.PaymentTitle,
- url: window.location.href,
- pageType: PageData.PageType,
elementType: ElementType.Button,
position: elementId,
name: 'paypal',