Add IP to all python Segment tracking calls
This commit is contained in:
@@ -1062,6 +1062,7 @@ class CourseEnrollment(models.Model):
|
||||
'run': self.course_id.run,
|
||||
'mode': self.mode,
|
||||
}, context={
|
||||
'ip': tracking_context.get('ip'),
|
||||
'Google Analytics': {
|
||||
'clientId': tracking_context.get('client_id')
|
||||
}
|
||||
|
||||
@@ -1179,6 +1179,7 @@ def login_user(request, error=""): # pylint: disable=too-many-statements,unused
|
||||
'provider': None
|
||||
},
|
||||
context={
|
||||
'ip': tracking_context.get('ip'),
|
||||
'Google Analytics': {
|
||||
'clientId': tracking_context.get('client_id')
|
||||
}
|
||||
@@ -1635,6 +1636,7 @@ def create_account_with_params(request, params):
|
||||
'provider': third_party_provider.name if third_party_provider else None
|
||||
},
|
||||
context={
|
||||
'ip': tracking_context.get('ip'),
|
||||
'Google Analytics': {
|
||||
'clientId': tracking_context.get('client_id')
|
||||
}
|
||||
|
||||
@@ -604,6 +604,7 @@ def login_analytics(strategy, auth_entry, *args, **kwargs):
|
||||
'provider': getattr(kwargs['backend'], 'name')
|
||||
},
|
||||
context={
|
||||
'ip': tracking_context.get('ip'),
|
||||
'Google Analytics': {
|
||||
'clientId': tracking_context.get('client_id')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user