diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 86fcad5b..69ff9fea 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -57,6 +57,12 @@ const Sidebar = ({ const handleClick = () => { setIsOpen(false); + + // check to see if hotjar is available, then trigger hotjar event + const hasWindow = typeof window !== 'undefined'; + if (hasWindow && window.hj) { + window.hj('event', 'ocm_learning_assistant_chat_closed'); + } }; const handleUpdateCurrentMessage = (event) => {