This model of pre-gate sensor does not require to solder wires to the pins of the switch, which can be a chore when doing several of them. You only need a 5-pin female JST 2.54, which you will crimp only the most outside pins (1 and 5), leaving the others empty and insert it under the gate to make contact with the switch.
Additional materials:
Consider using some modifications that I made
The author remixed this model.
with pregate sensor