Is There a Workaround for Tagging Sibling Elements in Pendo?
I need to tag an element that is identifiable by its sibling. We have the following repeated structure in the code where the "Identifying text" is changing.
<div classA>
<div classB>
<span>
"Identifying text"
</span>
</div>
<div>
<div classC>
<div classD>
<label id="ID0">
</div>
</div>
</div>
</div>
Is there a way to tag the label based on the identifying text?
0
Comments
Hi! Thanks for posting. We don't currently have a way to tag an HTML element based on the presence or absence of a sibling element. One potential workaround would be to use Click Event Properties. Using click event properties you could tag the element (in this case something like the label) as the feature and tag the span with the identifying text as the event property. When someone clicks on the tagged feature - the text on the click event property element would be returned to Pendo. You can then use segmentation to separate out particular values that came back in the property. Not sure if that workaround would fit your use case - but hopefully it helps!
Please sign in to leave a comment.