I couldn't find a runout sensor that I liked to use the Z stop switch from my printer. So, I decided to try my own. I made a new back plate for the display for my printer, then attached my sensor to it with superglue. It functions just as I wanted and works great for me. If you want to use it for yours, feel free. If you have any questions, I'll do my best to help.
Once you get your switch in where you like it, then mount the sensor whereever works best for you. For me was just behind the display screen, under my filament roll. I angled the sensor so the filament doesn't bind easily.