Hi everyone,
i have a problem with A/B test. I want to change color of "add to cart" button.
I created a javascript code (document.getElementsByClassName("add-to-cart")[0].style.background = "#5CB85C";), if i launch the code in the console the color of the button change, but when i put this code in google tag manager (or google optimize) and i set the tag for A/B test, the color of the button at the beginning of the page load it works, but when the page is fully loaded the button returns to the original color, as if other javascrit codece was loaded afterwards.
Do you know why this happens and how to fix it?