Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
9ac5558e
Commit
9ac5558e
authored
Nov 24, 2014
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6025 from edx/renzo/fix-identify-call
Use analytics.identify instead of the old utility function
parents
7b36645e
03f38dd8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
common/static/js/src/utility.js
+0
-7
lms/templates/widgets/segment-io.html
+4
-1
No files found.
common/static/js/src/utility.js
View file @
9ac5558e
...
...
@@ -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
});
};
lms/templates/widgets/segment-io.html
View file @
9ac5558e
...
...
@@ -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 -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment