526ac935 by Administrator

Merge branch '31531_apply_tokenization_on_other_llms' into 'master'

#32613 - Add mixpanel tracking on upgrade modal and the recent model used

See merge request !122
2 parents 571228d1 bb108a0e
Pipeline #29865 for 526ac935 passed in 17 seconds
......@@ -251,6 +251,31 @@ function App() {
}
}
useEffect(() => {
const element = document.querySelector('#modal-container #modal-cta')
const handleMixpanel = () => {
if (window.mixpanel) {
window.mixpanel.track('chatbot-plus-upgrade-modal', {
'click-location': 'upgrade-modal',
'upgrade': currentModel
});
}
}
if (element) {
element.addEventListener('click', handleMixpanel)
}
return () => {
if (element) {
element.removeEventListener('click', handleMixpanel)
}
}
}, [currentModel])
const [startedInteraction, setStartedInteraction] = useState(false);
return (
<div className="App">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!