A dog who urinates on carpet is usually either not well-housebroken, or is smelling old urine deposits and re-marking the territory. For best results, revisit potty training and clean your carpets well.
See Your Vet
Take your pup for a checkup to ensure there isn't a health issue that's making him incontinent. Bladder or kidney issues can trigger hard-to-control urination symptoms, but simple disorders usually can be treated effectively if caught early.
Some dogs urinate on the carpet when they're excited or anxious. Monitor your pup's bathroom habits to see if there's anything in particular that triggers his behavior. He may be suffering from separation anxiety and be overly happy to see you when you come home, or he may be afraid of strangers. Proper socialization and, in some cases, behavioral training, can help to eliminate the problem.
Check For Old Urine
Traces of urine can remain in carpet for a long time. Even if carpets have been cleaned, unless an enzymatic cleaning agent was used to break down and eliminate the urine, your dog may be able to smell it. This applies not only to spots he's marked before, but those other animals may have marked long ago. Use a black light to check your carpets for residual urine and clean it well.
Establish a Schedule
If you don't have your dog on a regular bathroom schedule, the carpet urination problem could be of your own making. Dogs can't hold their bladders all day, puppies and senior dogs in particular. Get into a regular bathroom routine and essentially work toward housebreaking your dog. Take your pup out to his bathroom spot when he wakes up, before bed and within a few minutes of eating, drinking, playing or chewing. Reward him with treats when he does his business in the right spot.