You need to wire it into something that is only active when the key is turned on. Ignition switch would be ideal, but it might be hard finding room on the ignition switch. On some bikes the main headlamp will only come on once the key is in the "on" position, this then becomes one circuit on the bike that you could use to trip the relay.