Hi everyone! To track user actions (such as clicking a button on my website), I’ve used the autocapture event “Element Click.” I’ve also added an ID attribute to the button to help identify it. However, when users click the button, Mixpanel doesn’t always capture the event correctly. Some of the captured events include the element_id in the properties, while others don’t. I’m wondering if this is a bug or expected behavior?
After testing, I assumed that the autocapture event “Element Click” would capture the exact HTML tag that the user clicks. Here is the HTML of the button I'm tracking — it contains both a <button> and a <span> tag (Image 1). I tested by clicking directly on each tag, and received the corresponding “Element Click” event (Image 2,3). In this case, what can I do to ensure that when a user clicks the button (regardless of whether they click on the <button> or the <span>), the “Element Click” event always includes the element ID?