Not sure about pill treatments but I had tried a bunch of ineffective things before a friend recommended me one of these Seresto collars.
They’re just magic man, I don’t know. My dog and cat used to consistently get fleas, but a couple of weeks after I got them one of those, every freaking bug just vanished. Nothing ever since, as far as I can tell (I still check them often).
If anyone knows how these works, I’d love to be enlightened!