If you plugged it in, what did you plug it in to?
Looks about where the reverse light switch is located on the gearbox
That cable with the green crusties could do with replacing really.
It should positively 'clip' in to place. If it doesn't then its likely either the plug or the connector on the switch is damaged.