Rename SEGMENT_KEY to have a unique key name for both CMS and LMS

This commit is contained in:
Bill DeRusha
2015-10-01 18:39:57 -04:00
parent cc15a9ada8
commit bcb71a3255
21 changed files with 30 additions and 30 deletions

View File

@@ -1052,7 +1052,7 @@ class CourseEnrollment(models.Model):
with tracker.get_tracker().context(event_name, context):
tracker.emit(event_name, data)
if settings.SEGMENT_KEY:
if hasattr(settings, 'LMS_SEGMENT_KEY') and settings.LMS_SEGMENT_KEY:
tracking_context = tracker.get_tracker().resolve_context()
analytics.track(self.user_id, event_name, {
'category': 'conversion',

View File

@@ -1163,7 +1163,7 @@ def login_user(request, error=""): # pylint: disable=too-many-statements,unused
LoginFailures.clear_lockout_counter(user)
# Track the user's sign in
if settings.SEGMENT_KEY:
if hasattr(settings, 'LMS_SEGMENT_KEY') and settings.LMS_SEGMENT_KEY:
tracking_context = tracker.get_tracker().resolve_context()
analytics.identify(user.id, {
'email': email,
@@ -1601,7 +1601,7 @@ def create_account_with_params(request, params):
third_party_provider = provider.Registry.get_from_pipeline(running_pipeline)
# Track the user's registration
if settings.SEGMENT_KEY:
if hasattr(settings, 'LMS_SEGMENT_KEY') and settings.LMS_SEGMENT_KEY:
tracking_context = tracker.get_tracker().resolve_context()
identity_args = [
user.id, # pylint: disable=no-member