From 2cca6c377576338d7d5f1caa531b817a75c5300f Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Fri, 21 Mar 2014 12:20:33 +0000 Subject: [PATCH] changed event tracking to work correctly, only certain json attrs are allowed --- services/web/public/coffee/file-tree/EntityView.coffee | 4 ++-- .../web/public/coffee/file-tree/FileTreeManager.coffee | 4 ++-- services/web/public/coffee/file-tree/FolderView.coffee | 3 +++ .../web/public/coffee/file-tree/RootFolderView.coffee | 10 +++++----- .../web/public/coffee/history/HistoryManager.coffee | 4 ++-- .../project-members/ProjectMembersManager.coffee | 4 ++-- .../coffee/settings/DropboxSettingsManager.coffee | 4 ++-- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/services/web/public/coffee/file-tree/EntityView.coffee b/services/web/public/coffee/file-tree/EntityView.coffee index 1e00b75748..073dbda345 100644 --- a/services/web/public/coffee/file-tree/EntityView.coffee +++ b/services/web/public/coffee/file-tree/EntityView.coffee @@ -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: () -> diff --git a/services/web/public/coffee/file-tree/FileTreeManager.coffee b/services/web/public/coffee/file-tree/FileTreeManager.coffee index cdde12d21e..8ffd20ac79 100644 --- a/services/web/public/coffee/file-tree/FileTreeManager.coffee +++ b/services/web/public/coffee/file-tree/FileTreeManager.coffee @@ -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 #{entity.get("name")}?" diff --git a/services/web/public/coffee/file-tree/FolderView.coffee b/services/web/public/coffee/file-tree/FolderView.coffee index 304059ef28..716e1429f2 100644 --- a/services/web/public/coffee/file-tree/FolderView.coffee +++ b/services/web/public/coffee/file-tree/FolderView.coffee @@ -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) }] diff --git a/services/web/public/coffee/file-tree/RootFolderView.coffee b/services/web/public/coffee/file-tree/RootFolderView.coffee index 26c7894770..70f065148f 100644 --- a/services/web/public/coffee/file-tree/RootFolderView.coffee +++ b/services/web/public/coffee/file-tree/RootFolderView.coffee @@ -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: () -> diff --git a/services/web/public/coffee/history/HistoryManager.coffee b/services/web/public/coffee/history/HistoryManager.coffee index 4679f426ff..d7ad956f28 100644 --- a/services/web/public/coffee/history/HistoryManager.coffee +++ b/services/web/public/coffee/history/HistoryManager.coffee @@ -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) ->) -> diff --git a/services/web/public/coffee/project-members/ProjectMembersManager.coffee b/services/web/public/coffee/project-members/ProjectMembersManager.coffee index 4fdafdf9db..82ff4bfdcc 100644 --- a/services/web/public/coffee/project-members/ProjectMembersManager.coffee +++ b/services/web/public/coffee/project-members/ProjectMembersManager.coffee @@ -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) -> diff --git a/services/web/public/coffee/settings/DropboxSettingsManager.coffee b/services/web/public/coffee/settings/DropboxSettingsManager.coffee index c378a0a164..1f5953835f 100644 --- a/services/web/public/coffee/settings/DropboxSettingsManager.coffee +++ b/services/web/public/coffee/settings/DropboxSettingsManager.coffee @@ -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()