Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Cohesion stage keys and remove taggy #31

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ NEW_RELIC_LICENSE_KEY=null
ORDER_HISTORY_URL=null
REFRESH_ACCESS_TOKEN_ENDPOINT=null
SEGMENT_KEY=null
COHESION_TAGULAR_WRITE_KEY=null
COHESION_TAGULAR_SOURCE_KEY=null
SITE_NAME=null
USER_INFO_COOKIE_NAME=null
USER_LOCATION_COOKIE_NAME=null
Expand Down
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ MARKETING_SITE_BASE_URL='http://localhost:18000'
ORDER_HISTORY_URL=http://localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh'
SEGMENT_KEY='VMsX2obE9Xveo4se3c6CmfdG0LZVc7qI'
COHESION_TAGULAR_WRITE_KEY='wk_2nkzqlbOsxrS0UwzagXrVuHqQyy'
COHESION_TAGULAR_SOURCE_KEY='src_2nkzqlaM9p3iziS4RHRHuRecrX8'
SITE_NAME='edX'
USER_INFO_COOKIE_NAME='edx-user-info'
USER_LOCATION_COOKIE_NAME='prod-edx-cf-loc'
Expand Down
2 changes: 2 additions & 0 deletions .env.development-stage
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ MARKETING_SITE_BASE_URL='/proxy/lms'
ORDER_HISTORY_URL=http://localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT='/proxy/lms/login_refresh'
SEGMENT_KEY=null
COHESION_TAGULAR_WRITE_KEY='wk_2nkzqlbOsxrS0UwzagXrVuHqQyy'
COHESION_TAGULAR_SOURCE_KEY='src_2nkzqlaM9p3iziS4RHRHuRecrX8'
SITE_NAME='edX'
USER_INFO_COOKIE_NAME='npmstage-edx-user-info'
USER_LOCATION_COOKIE_NAME='prod-edx-cf-loc'
Expand Down
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ MARKETING_SITE_BASE_URL='http://localhost:18000'
ORDER_HISTORY_URL=http://localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh'
SEGMENT_KEY=null
COHESION_TAGULAR_WRITE_KEY=null
COHESION_TAGULAR_SOURCE_KEY=null
SITE_NAME='edX'
USER_INFO_COOKIE_NAME='edx-user-info'
USER_LOCATION_COOKIE_NAME='prod-edx-cf-loc'
Expand Down
4 changes: 2 additions & 2 deletions cohesion.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const cohesionConfig = {
defaultCategory: '',
defaultSubject: '',
tagularApiKey: '',
tagularSourceKey: 'src_2euJfAVNt6Z9kQz4e9t1SQBtm8x',
tagularWriteKey: 'wk_2euJfDkJVTtEVzsC8BPOb0g9dVj',
tagularSourceKey: process.env.COHESION_TAGULAR_SOURCE_KEY,
tagularWriteKey: process.env.COHESION_TAGULAR_WRITE_KEY,
tagularCookieDomain: 'edx.org',
tagularDomainWhitelist: JSON.stringify([
'edx.org',
Expand Down
1 change: 0 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
domainWhitelist: <%= htmlWebpackPlugin?.options?.cohesionConfig?.tagularDomainWhitelist %>,
apiVersion: 'v2/t',
multiparty: true,
taggy: { enabled: true },
}
})
</script>
Expand Down
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
Loading