Your pup has rectal glands located around his anus that secrete a liquid in his poop that marks his territory in much the same way as when he pees. The big difference is that the scent is much stronger. But from time to time these glands become blocked and must be cleaned out or they can become impacted and infected. One way to spot the early signs that your pup is having a problem is when he starts dragging his butt on the floor or he starts chewing on the area because his bum itches. The good news is that once you have learned how to clean his rectal glands, it should only take you a couple of minutes to get the job done.
Your dog probably never gives his rectal glands much of a thought, until they start itching or have become impacted and painful. You may notice him having problems pooping because impacted anal glands can be painful. Should his glands become overfull, he counts on you to clean them out by massaging them to remove excess fluid and clear out the passages the fluids flow through.
Smaller dogs are more likely than large dogs to suffer from overfull rectal glands that need to be cleaned out on a regular basis. You should check them every time you give your pup a bath or notice he is suddenly doing the "butt scooting boogie" on your carpets. Take your time and be gentle to make the experience as comfortable as possible for your pup. Don't hesitate to call your vet if you have any hesitation or suspect your dog has a medical condition that calls for an exam and treatment.