The simple way is take the big red wire (#2) on the 2 wire connector and hook it to the output terminal and the other smaller brown wire in the 2 wire connector goes to the ignition switch in series with a bulb that is the KEY run it thru a bulb before the switch.
O'reileys has a replacement pigtail if you need one and I also believe they have
(or someone does for sure just don't remember maybe a boat parts supply house?)
a voltage regulator replacement that does all this on its own internally. hth