How do you get a dog to take cough syrup?

Wrap bacon or something that they like around it they'll open their mouth and you put it in