Hi, Obviously it matters that the gate is connected to the correct place but does it matter for A1, A2 and the optoisolator that controls it?

Since i started playing with triacs ive always connected the live wire to A1 and A2 to the load and the opto. Im trying to design some more space efficient PCBs and it would help a lot if i could connect the live wire to A2 and the load to A1. I assume this is perfectly fine as its AC anyway but what about the opto? Does it matter if the opto is connected to A1 or A2 or does it make a difference if its on the live side or the load side?