Vanilla extract. I know it works to keep gnats away and I have never seen a fly on the dogs. I put it behind their ears and on the base of their tail.
Misty- Samoyed Mix, Tannor- Golden Retriever CGC
Robyn- GSD CGC, TC, Midnite-GSD CGC,TC, Brennan-Golden Retriever CGC, Batman-Husky/Greyhound , Apollo-GSD