When Buddy first came home, we just made sure that we took him outside each time he woke up from a nap and after food. When we make the effort to do that he is very good. Realistically puppies don't gain full control of their bladders until around 6 months or age, sometimes older.
Cody's owners bought a special dog loo, a piece of synthetic grass that you can leave inside for your dog to go on. They live in a fully carpeted apartment and work longer days, so this was a good solution for them. For Pet Loo and other products you can check out the Pookinuk website, they have some good news items and videos too.