It is necessary to track the name of the tab on which the click was made. I use {{ClickText}}, but there are two types of problems:
When clicking on a child element to which the name has not been passed, {{ClickText}} is not filled in;
When clicking on a child element to which the name has been passed, {{ClickText}} is duplicated, that is, both the name of the parent element and the child element are reflected.
Tell me, please, how can this problem be solved?
Thanks.
<button>
<span>{React.createElement(svg)}</span>
Name for tracking
</button>
If I don’t pass a name to the svg for tracking, then when I click on the svg in the button, the name of the button will not be tracked.
If I pass a name to svg, there will be a duplicate name.