I don't know if the ones they sell for traffic lights are powerful enough.
A 1X2X1/8" neodymium magnet does work. Just watch your fingers when you slap it on the frame, they are very strong. It creates a magnetic field equal to all the iron you have in your car so the sensor will detect the bike. If you have an old VCR, you can find one under the main drive motor. It should be large enough.