changed event tracking to work correctly, only certain json attrs are allowed

This commit is contained in:
Henry Oswald 2014-03-21 12:20:33 +00:00
parent 3e3b1d3f5b
commit 2cca6c3775
7 changed files with 18 additions and 15 deletions

View file

@ -111,12 +111,12 @@ define [
text: "Rename"
onClick: () =>
@startRename()
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"DropdownMenu", entityDropdown:"entityView"})
ga('send', 'event', 'editor-interaction', 'renameEntity', "entityView")
}, {
text: "Delete"
onClick: () =>
@manager.confirmDelete(@model)
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"DropdownMenu", entityDropdown:"entityView"})
ga('send', 'event', 'editor-interaction', 'deleteEntity', "entityView")
}]
_initializeDrag: () ->

View file

@ -155,7 +155,7 @@ define [
entity_id = @getSelectedEntityId()
return if !entity_id?
@views[entity_id]?.startRename()
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"topMenu"})
ga('send', 'event', 'editor-interaction', 'renameEntity', "topMenu")
renameEntity: (entity, name) ->
@ -249,7 +249,7 @@ define [
# DELETING
confirmDelete: (entity) ->
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"topMenu"})
ga('send', 'event', 'editor-interaction', 'deleteEntity', "topMenu")
Modal.createModal
title: "Confirm Deletion"
message: "Are you sure you want to delete <strong>#{entity.get("name")}</strong>?"

View file

@ -132,14 +132,17 @@ define [
return [{
text: "New file"
onClick: () =>
ga('send', 'event', 'editor-interaction', 'newFile', "folderView")
@manager.showNewDocModal(@model)
}, {
text: "New folder"
onClick: () =>
ga('send', 'event', 'editor-interaction', 'newFolder', "folderView")
@manager.showNewFolderModal(@model)
}, {
text: "Upload file"
onClick: () =>
ga('send', 'event', 'editor-interaction', 'uploadFile', "folderView")
@manager.showUploadFileModal(@model)
}]

View file

@ -11,23 +11,23 @@ define [
"click .js-new-file" : (e) ->
e.preventDefault()
@manager.showNewDocModal()
ga('send', 'event', 'editor-interaction', 'newFile', {menu:"DropdownMenu", entityDropdown:"folder"})
ga('send', 'event', 'editor-interaction', 'newFile', "topMenu")
"click .js-new-folder" : (e) ->
e.preventDefault()
@manager.showNewFolderModal()
ga('send', 'event', 'editor-interaction', 'newFolder', {menu:"DropdownMenu", entityDropdown:"folder"})
ga('send', 'event', 'editor-interaction', 'newFolder', "topMenu")
"click .js-upload-file" : (e) ->
e.preventDefault()
@manager.showUploadFileModal()
ga('send', 'event', 'editor-interaction', 'uploadFile', {menu:"DropdownMenu", entityDropdown:"folder"})
ga('send', 'event', 'editor-interaction', 'uploadFile', "topMenu")
"click .js-delete-btn" : (e) ->
e.preventDefault()
@manager.confirmDeleteOfSelectedEntity()
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"DropdownMenu", entityDropdown:"folder"})
ga('send', 'event', 'editor-interaction', 'deleteEntity', "topMenu")
"click .js-rename-btn" : (e) ->
e.preventDefault()
@manager.renameSelected()
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"DropdownMenu", entityDropdown:"folder"})
ga('send', 'event', 'editor-interaction', 'renameEntity', "topMenu")
)
render: () ->

View file

@ -42,10 +42,10 @@ define [
@view.setHistoryAreaToDisplayEnableVersioning()
enableVersioning: ->
ga('send', 'event', 'subscription-funnel', 'askToUpgrade', {history:true})
ga('send', 'event', 'subscription-funnel', 'askToUpgrade', "history")
AccountManager.askToUpgrade @ide,
onUpgrade: () =>
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', {history:true})
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', "history")
@showHistoryArea()
takeSnapshot: (message, callback = (error) ->) ->

View file

@ -81,11 +81,11 @@ define [
@ide.showGenericServerErrorMessage()
return
if !added
ga('send', 'event', 'subscription-funnel', 'askToUpgrade', {projectMemebrs:true})
ga('send', 'event', 'subscription-funnel', 'askToUpgrade', "projectMemebrs")
AccountManager.askToUpgrade @ide,
why: "to add additional collaborators"
onUpgrade: () =>
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', {projectMemebrs:true})
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', "projectMemebrs")
@addMember(email, privileges)
afterMemberRemoved: (memberId) ->

View file

@ -17,11 +17,11 @@ define [
@tab.empty()
if !@ide.isAllowedToDoIt "owner"
else if !@project.get('features').dropbox
ga('send', 'event', 'subscription-funnel', 'askToUpgrade', {dropbox:true})
ga('send', 'event', 'subscription-funnel', 'askToUpgrade', "dropdown")
accountManager.askToUpgrade @ide,
onUpgrade: =>
@checkIfUserIsLinkedToDropbox()
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', {dropbox:true})
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', "dropdown")
else
@checkIfUserIsLinkedToDropbox()