I can't say my husband and I have the cleanest mouths, though we try. Our solution was to tell our daughter she could only use certain words at home and nowhere else. And, we don't make a big deal about it if she uses them at home. No reaction = big decline in the use of the words. There's only one she's ever said outside the house, and now she's not allowed to use that word at all anymore (and she doesn't).
Now, if she just says a word over and over again (only happened once), we tell her to stop as that's not how the word is used (it's the word she can't say anymore). She hasn't done that since.
Funny story ... one day I was home sick, so my husband picked my daughter up from my parents' (they watch her when she's not in school). As soon as she walked in the door, she said "____@____.com!" It seems she had been wanting to say that ALL day, but knew she couldn't say it anywhere but home. She got it out of her system and that was it. LOL