mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 23:59:01 +02:00
Read project id from the global window var
This commit is contained in:
@@ -301,8 +301,7 @@ define [
|
||||
onChange = () ->
|
||||
updateCount++
|
||||
|
||||
projectId = _.last(location.pathname.split("/"))
|
||||
event_tracking.editingSessionHeartbeat(projectId)
|
||||
event_tracking.editingSessionHeartbeat()
|
||||
|
||||
if updateCount == 100
|
||||
event_tracking.send 'editor-interaction', 'multi-doc-update'
|
||||
|
||||
@@ -35,9 +35,9 @@ define [
|
||||
send: (category, action, label, value)->
|
||||
ga('send', 'event', category, action, label, value)
|
||||
|
||||
editingSessionHeartbeat: _.throttle( (projectId, segmentation = {}) ->
|
||||
editingSessionHeartbeat: _.throttle( (segmentation = {}) ->
|
||||
$http({
|
||||
url: "/editingSession/#{projectId}",
|
||||
url: "/editingSession/#{window.project_id}",
|
||||
method: "PUT",
|
||||
data: segmentation,
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user