mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Read project id from the global window var
This commit is contained in:
parent
4ca71fb379
commit
8a1523cc03
2 changed files with 3 additions and 4 deletions
|
@ -301,8 +301,7 @@ define [
|
||||||
onChange = () ->
|
onChange = () ->
|
||||||
updateCount++
|
updateCount++
|
||||||
|
|
||||||
projectId = _.last(location.pathname.split("/"))
|
event_tracking.editingSessionHeartbeat()
|
||||||
event_tracking.editingSessionHeartbeat(projectId)
|
|
||||||
|
|
||||||
if updateCount == 100
|
if updateCount == 100
|
||||||
event_tracking.send 'editor-interaction', 'multi-doc-update'
|
event_tracking.send 'editor-interaction', 'multi-doc-update'
|
||||||
|
|
|
@ -35,9 +35,9 @@ define [
|
||||||
send: (category, action, label, value)->
|
send: (category, action, label, value)->
|
||||||
ga('send', 'event', category, action, label, value)
|
ga('send', 'event', category, action, label, value)
|
||||||
|
|
||||||
editingSessionHeartbeat: _.throttle( (projectId, segmentation = {}) ->
|
editingSessionHeartbeat: _.throttle( (segmentation = {}) ->
|
||||||
$http({
|
$http({
|
||||||
url: "/editingSession/#{projectId}",
|
url: "/editingSession/#{window.project_id}",
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
data: segmentation,
|
data: segmentation,
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in a new issue