Send event when discover new header link clicked (#107)

Send event when discover new header link clicked
This commit is contained in:
Douglas Hall
2019-06-26 13:11:56 -04:00
committed by GitHub
3 changed files with 10 additions and 4 deletions

6
package-lock.json generated
View File

@@ -1049,9 +1049,9 @@
}
},
"@edx/frontend-component-site-header": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@edx/frontend-component-site-header/-/frontend-component-site-header-2.2.0.tgz",
"integrity": "sha512-Xwi1yAFRXM2FlgaQLAXfDpomrI1nTmVei7xVdBT+vnbFHt9z/8ynkTgmEhjJCz7q8/6qPMl+ajzq/8rPCJaR+g==",
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@edx/frontend-component-site-header/-/frontend-component-site-header-2.4.0.tgz",
"integrity": "sha512-Z1JICIJxG6kcpBck7YxEubPZyiBGS2z0SrRJXX7JcRRpKjDNDcooOQYG/SiZt5OMVVwOOeJdQDxhMtu3zT+fSQ==",
"requires": {
"react-responsive": "^6.1.1",
"react-transition-group": "^2.5.2"

View File

@@ -29,7 +29,7 @@
"@edx/frontend-analytics": "^2.0.0",
"@edx/frontend-auth": "^5.3.4",
"@edx/frontend-component-footer": "^6.0.2",
"@edx/frontend-component-site-header": "^2.2.0",
"@edx/frontend-component-site-header": "^2.4.0",
"@edx/frontend-i18n": "^2.1.0",
"@edx/frontend-logging": "^2.0.2",
"@edx/paragon": "^4.2.6",

View File

@@ -47,6 +47,12 @@ function PageContent({
type: 'item',
href: `${configuration.MARKETING_SITE_BASE_URL}/course`,
content: intl.formatMessage(messages['siteheader.links.content.search']),
onClick: () => {
sendTrackEvent(
'edx.bi.dashboard.find_courses_button.clicked',
{ category: 'account', label: 'header' },
);
},
},
];
const userMenu = [