Track 'Back to top' click

This commit is contained in:
Serghei Iakovlev 2022-07-24 13:13:08 +02:00
parent 6d842eefd0
commit abab957fb4
No known key found for this signature in database
GPG key ID: C6AF1016BBDEA800

View file

@ -60,6 +60,12 @@ function onClickCallback(event) {
const element = event.target;
const className = element.getAttribute('class');
// Track 'Back to top' click
if (className === 'top-of-site-link') {
trackInternalEvent('Back to top', 'navigation');
return;
}
// Track menu show
if (className === 'sidebar-toggle') {
trackInternalEvent('Sidebar Toggle', 'navigation');