stomped. Hoping someone can help me out here. I have to set up a rule that triggers a click event when a user selects "Buy Now." I was looking at the pages and noticed that the buttons are set up the same way across the pages, and the only difference is the text.
I had started the below but that's when I noticed that it wouldn't work since other buttons are using the same setup.
This is the HTML:
<button _ngcontent-qol-c212="" preventmultipleclicks="" class="btn btn-transition sm-text-centered btn-block margin-top-20 btn-primary ng-star-inserted" id="myEngine.footerButton.next" data-e2e="transition-button-next">Buy now</button>
![SofiDel_1984_0-1719867128312.png SofiDel_1984_0-1719867128312.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/76384i8D9D40801A73A2F7/image-size/medium?v=v2&px=400)
any advice?
maybe create a data element like
var buyOncomplete = document.getElementsByClassName("btn btn-transition sm-text-centered btn-block margin-top-20 btn-primary ng-star-inserted")[0].innerText;
return buyOncomplete;
then add it to the rule as a condition - could that work?