Rename SEGMENT_KEY to have a unique key name for both CMS and LMS
This commit is contained in:
@@ -244,7 +244,7 @@ EMAIL_HOST_USER = AUTH_TOKENS.get('EMAIL_HOST_USER', EMAIL_HOST_USER)
|
||||
EMAIL_HOST_PASSWORD = AUTH_TOKENS.get('EMAIL_HOST_PASSWORD', EMAIL_HOST_PASSWORD)
|
||||
|
||||
# Note that this is the Studio key for Segment. There is a separate key for the LMS.
|
||||
SEGMENT_KEY = AUTH_TOKENS.get('SEGMENT_KEY')
|
||||
CMS_SEGMENT_KEY = AUTH_TOKENS.get('SEGMENT_KEY')
|
||||
|
||||
AWS_ACCESS_KEY_ID = AUTH_TOKENS["AWS_ACCESS_KEY_ID"]
|
||||
if AWS_ACCESS_KEY_ID == "":
|
||||
|
||||
@@ -78,7 +78,7 @@ FEATURES = {
|
||||
'STUDIO_REQUEST_EMAIL': '',
|
||||
|
||||
# Segment - must explicitly turn it on for production
|
||||
'SEGMENT_KEY': None,
|
||||
'CMS_SEGMENT_KEY': None,
|
||||
|
||||
# Enable URL that shows information about the status of various services
|
||||
'ENABLE_SERVICE_STATUS': False,
|
||||
|
||||
@@ -167,7 +167,7 @@ FEATURES['ENABLE_SERVICE_STATUS'] = True
|
||||
# If there's an environment variable set, grab it to turn on Segment
|
||||
# Note that this is the Studio key. There is a separate key for the LMS.
|
||||
import os
|
||||
SEGMENT_KEY = os.environ.get('SEGMENT_KEY')
|
||||
CMS_SEGMENT_KEY = os.environ.get('SEGMENT_KEY')
|
||||
|
||||
|
||||
#####################################################################
|
||||
|
||||
@@ -211,7 +211,7 @@ PASSWORD_HASHERS = (
|
||||
)
|
||||
|
||||
# No segment key
|
||||
SEGMENT_KEY = None
|
||||
CMS_SEGMENT_KEY = None
|
||||
|
||||
FEATURES['ENABLE_SERVICE_STATUS'] = True
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ ADDL_INSTALLED_APPS = []
|
||||
AUTH_USE_CAS = False
|
||||
CAS_ATTRIBUTE_CALLBACK = None
|
||||
MICROSITE_ROOT_DIR = ''
|
||||
SEGMENT_KEY = None
|
||||
CMS_SEGMENT_KEY = None
|
||||
DATADOG = {}
|
||||
ADDL_INSTALLED_APPS = []
|
||||
LOCAL_LOGLEVEL = 'INFO'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
%>
|
||||
% endif
|
||||
|
||||
% if settings.SEGMENT_KEY:
|
||||
% if settings.CMS_SEGMENT_KEY:
|
||||
<!-- begin Segment -->
|
||||
<script type="text/javascript">
|
||||
// if inside course, inject the course location into the JS namespace
|
||||
@@ -15,7 +15,7 @@
|
||||
%endif
|
||||
|
||||
var analytics=analytics||[];analytics.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"===document.location.protocol?"https://":"http://")+"d2dq2ahtl5zl1z.cloudfront.net/analytics.js/v1/"+e+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);var r=function(e){return function(){analytics.push([e].concat(Array.prototype.slice.call(arguments,0)))}},i=["identify","track","trackLink","trackForm","trackClick","trackSubmit","pageview","ab","alias","ready"];for(var s=0;s<i.length;s++)analytics[i[s]]=r(i[s])};
|
||||
analytics.load("${ settings.SEGMENT_KEY }");
|
||||
analytics.load("${ settings.CMS_SEGMENT_KEY }");
|
||||
|
||||
% if user.is_authenticated():
|
||||
analytics.identify("${ user.id }", {
|
||||
|
||||
Reference in New Issue
Block a user