From the comments of that link
The gold one connects to ground, the first silver one connects to your 12V supply (or 5-12V, but not higher, because the resistor in series with the LED internally is designed for 12V) and the second silver terminal connects to your load +12V rail.
So wire the gold to ground and first silver to 5V. Then the second silver to the input pin, and also to that pin connect a 10k resistor with the other end of the resistor to ground.
The working correctly with batteries is only an illusion, it will be unreliable.
Edit: I'm sure i saw your reply but now it's gone
Yes I deleted it because I changed my mind.