For those who aren't keen on the electrical connections, here are some links to ebay for two sellers that will supply a plug and play type setup. it will be a lot neater and easier. cost is circa $30-40.
NEW Subaru Impreza Liberty Forester TOW BAR Harness NO Socket Attached | eBay
Subaru Impreza Liberty Forester Trailer Harness | eBay
Furthermore, you will notice that the black and blue wires are not usually required.
Cheers, Fred