So a dog that chooses to walk behind you instead of with you or in front of you is a submissive or "middle of the pack" dog. It's a sign that they think that they're place is not alpha, or in the leader position. This is by no means a bad thing, but a boost of confidence or importance in the "pack" or household may help.
I would provide activity that stimulates your dogs confidence starting off leash. When you're at home watching TV or on your computer (leisure time) I'm assuming your dog is pretty chill and not in your face constantly. Call him by name and treat him when he comes up to you and regularly for activities that most would consider normal socialization. A good trick is "watch me". With "watch me"- place a treat in front of your face and say "watch me", when your dog looks up at you (eye contact) give the treat to him. Practice this over and over.
Standard harnesses encourage pulling, so I would try something called an Easy Walk Harness. It tucks behind the legs (armpit) and creates tension and pull at the pressure points without being harmful to the trachea, like standard collars. When walking, take a few steps and stop, give a sit command, and a watch me command, with treats, this command will encourage your dog to be and stay at a close enough distance next to you or a foot in front of you where a simple turn of the head directs that eye contact. This works a little better than a tug at the collar, and changing the word to "heel" JUST during walks will help teach your pup to stay within that walking range. Even when your dog has become good at this, continue doing random "watch me" commands to strengthen that eye contact you want. Watch me works for alot if different things, because is re directs their attention from what they're doing to looking at you, and increases your bond and respect, giving your dog a bit more confidence. Hope this helps.