Fix event "left-menu-documentation-click" not being fired properly (#11836)

GitOrigin-RevId: 5e9df12c699ff5c25389e8fb90fda73913e8c747
This commit is contained in:
M Fahru 2023-02-15 09:32:31 -07:00 committed by Copybot
parent 79f7d259e9
commit 47937c4073
3 changed files with 13 additions and 4 deletions

View file

@ -237,12 +237,10 @@ aside#left-menu.full-size(
new-source-editor="editor.newSourceEditor" new-source-editor="editor.newSourceEditor"
) )
if showSupport if showSupport
li li(ng-controller="LeftMenuDocumentationController")
a( a(
href='/learn', target="_blank" href='/learn', target="_blank"
event-tracking="left-menu-documentation-click " ng-click="sendLeftMenuDocumentationEvent()"
event-tracking-mb="true"
event-tracking-trigger="click"
) )
i.fa.fa-book.fa-fw i.fa.fa-book.fa-fw
|    #{translate('documentation')} |    #{translate('documentation')}

View file

@ -0,0 +1,10 @@
import App from '../../../base'
export default App.controller(
'LeftMenuDocumentationController',
function ($scope, eventTracking) {
$scope.sendLeftMenuDocumentationEvent = () => {
eventTracking.sendMB('left-menu-documentation-click')
}
}
)

View file

@ -4,3 +4,4 @@ import './services/settings'
import './controllers/SettingsController' import './controllers/SettingsController'
import '../../features/dictionary/controllers/modal-controller' import '../../features/dictionary/controllers/modal-controller'
import '../../features/editor-left-menu/controllers/editor-left-menu-controller' import '../../features/editor-left-menu/controllers/editor-left-menu-controller'
import '../../features/editor-left-menu/controllers/left-menu-documentation-controller'