Hello Neil, Two ways to do it, an on/off swiich on the earth side of the unit, letting you run it night and day. Or connect the live to the back light which would have the unit only working when the lights are on. If your pilot light works on dip and main beam that would work too. It does only have a tiny drain on the battery though, and I have left mine on all the time (12v 3ah battery). The reason behind this is that the smaller unit looks very much like an alarm warning light, which is a bonus! Personally I would go for the first option in your case simply because it is better to find out the bike is not charging in daylight, than at night. At least that way it gives you the chance to get parked up before darkness sets in.
Cheers Rob