Merge pull request #6025 from edx/renzo/fix-identify-call
Use analytics.identify instead of the old utility function
This commit is contained in:
@@ -40,10 +40,3 @@ window.rewriteStaticLinks = function(content, from, to) {
|
||||
var regex = new RegExp("(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_\+.~#?&//=]*))?"+fromRe, 'g');
|
||||
return content.replace(regex, replacer);
|
||||
};
|
||||
|
||||
window.identifyUser = function(userID, email, username) {
|
||||
analytics.identify(userID, {
|
||||
email: email,
|
||||
username: username
|
||||
});
|
||||
};
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
analytics.page();
|
||||
|
||||
% if user.is_authenticated():
|
||||
window.identifyUser("${user.id}", "${user.email}", "${user.username}");
|
||||
analytics.identify("${user.id}", {
|
||||
email: "${user.email}",
|
||||
username: "${user.username}"
|
||||
});
|
||||
% endif
|
||||
</script>
|
||||
<!-- end Segment.io -->
|
||||
|
||||
Reference in New Issue
Block a user