nyphur
nyphur

Reputation: 2896

Defining Heap Analytics events with components build by libraries?

I'm using Heap analytics to capture events. What's frustrating is that I'm using styled-components and and-design, so events will be defined like so:

enter image description here

As a workaround, I'm adding IDs (or data attributes) to my components like this:

enter image description here

However, this is where my problem lies: I'm using a component library, Ant design and I'm trying to add an ID or data attribute to a Select component:

import Select from 'antd/lib/select'

<div id="headcount--dropdown">
  <Select>
    {props.options}
  </Select>
</div>

However when I look at the event, I see something like this: enter image description here

Where the auto generated selector should be #headcount--dropdown

I'm not sure how to get the auto generated selector to ONLY show my ID or data attributes. Could someone please help?

Upvotes: 5

Views: 1112

Answers (0)

Related Questions