Can Mixpanel Track :hover events?

  • 28 April 2021
  • 2 replies

Badge +2

User hovers over a tooltip. Additional information appears. Sometimes the Tool tip is CSS generated content, other times it may be javascript generated.

How can Mixpanel track a :hover action on an object? If so, how? I could not find info searching the docs.

2 replies

Userlevel 1

Hey jyoung,


This will require you and your team to settle on of jquery function(s) like .on or .hover for CSS and JS. See below for some examples:

once you’ve settled on the function that fires correctly on hover, you will simply need to then add a mixpanel.track() call within the function that tracks an event e.g. “Tooltip: Hovered Over” with properties that details the nature of the tool tip e.g.

  • the words of the tooltip
  • part of the page the tooltip is on 
  • product the tooltip is providing help for
  • any other meta-data you can think of collecting about the tooltip
Badge +2

Thank you @ArthurCilley , you are on a roll today :)