Merge pull request #312 from sharelatex/sk-add-from-v2-flag-to-analytics

Add a `fromV2` flag to Analytics events, when coming from V2 instance
This commit is contained in:
Shane Kilkelly 2018-02-07 09:48:11 +00:00 committed by GitHub
commit a06c4003f9

View file

@ -37,6 +37,8 @@ module.exports =
method:"POST"
timeout:1000
url: "/user/#{user_id}/event"
if settings.overleaf?
opts.qs = {fromV2: 1}
makeRequest opts, callback
updateEditingSession: (userId, projectId, segmentation = {}, callback = (error) ->) ->
@ -52,6 +54,8 @@ module.exports =
qs:
userId: userId
projectId: projectId
if settings.overleaf?
opts.qs.fromV2 = 1
makeRequest opts, callback