Tracking a Zara page with conditions

Hello,

I am monitoring a few products on the Zara (https://www.zara.com/hu/en/merino-wool-knit-polo-shirt-p02632315.html?v1=405741147) website and I am trying to buy one of the sizes when it restocks.

The issue I am having is that when I monitor a part of the page, let’s say the button for the size S, I choose to monitor the outer html which has the codes for out of stock and in stock, but I still get random changes in the code, which then sends me a notification even though the size is not available. Sometimes it does it many times a day and it is annoying. I was thinking of using a condition, in particular if the text contains “size-in-stock”, then I would get a notification.

The thing is, I am not certain if the text is meant as only the text that is visual on the website, or if it includes the text in the code. This condition will work only if the condition monitors the text in the code, as “size-in-stock” will appear only there, not visually on the website.

Could you please help me correct any mistakes I’ve made in my approach?

Thanks in advance,
Jakub

from what i uderstand, you are monitoring the following button’s outerHTML.

<button class="size-selector-sizes-size__button" disabled="" data-qa-action="size-out-of-stock" role="option" aria-selected="false"><div class="size-selector-sizes-size__info"><div class="size-selector-sizes-size__label" data-qa-qualifier="size-selector-sizes-size-label">S</div></div></button>

a more accurate way to monitor this will be to monitor the button’s two fields text and attribute data-qa-action.

you will get an alert only when any of these two fields changes.

when monitoring outerHTML, it will be the outerHTML’s content. its content can be used in conditions.

check out https://distill.io/docs/web-monitor/using-conditions-to-get-alert-on-important-changes/#how-to-find-out-which-condition-triggered-the-alert. it helps understand what the text is and how conditions work.

does this make sense? let me know if you have any questions.