From 0eb338da1bfd5fb644e1b137e817cffe58931064 Mon Sep 17 00:00:00 2001 From: julianajlk Date: Fri, 8 Nov 2024 12:38:51 -0500 Subject: [PATCH] feat: Add Cohesion env variables to distinguish stage and prod --- .env | 2 ++ .env.development | 2 ++ .env.development-stage | 2 ++ .env.test | 2 ++ cohesion.config.js | 4 ++-- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 3b35f1590..3d1b12484 100644 --- a/.env +++ b/.env @@ -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 diff --git a/.env.development b/.env.development index a239c4371..10cc604d9 100644 --- a/.env.development +++ b/.env.development @@ -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' diff --git a/.env.development-stage b/.env.development-stage index 4e600db6a..8161b6f29 100644 --- a/.env.development-stage +++ b/.env.development-stage @@ -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' diff --git a/.env.test b/.env.test index eba51b57f..8ca2e2743 100644 --- a/.env.test +++ b/.env.test @@ -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' diff --git a/cohesion.config.js b/cohesion.config.js index 915773b15..c68169923 100644 --- a/cohesion.config.js +++ b/cohesion.config.js @@ -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',