You could try an IR sensor, works great on glass and fits just fine in the original print head.
Full installation write up and it has been installed by others,