[OE-2935] Fix to prevent js triggering on the wrong page