Electric Trailer brake wired-photo
The diode will need to go into the trailer loom wiring between the trailer ecu & the red wire - it's meant to stop the current in the red wire (when using manual lever) making it's way to the trailer ecu. The trailer stop lighst must illuminate when manual lever operated (so if the diode is in the red wire or "downstream" from the connection of red wire to trailer loom the diode will stop the current flow illuminating trailer lights & let current flow to trailer ecu)
Good idea to take blue wire all the way to socket as ensures highest current carrying capacity to socket.
PS the power feed should come direct from battery with the auto resetting breaker - least risk of power failure to unit.