Firstly, remember your dog isn’t trying to be naughty. Your dog is likely just distracted by all the amazing things going on in the world. Similar to a child – asking them to do homework in a quiet house is easier than asking them to do their homework at Disneyland.
Start slow when training in a new environment. Start by having your dog listen and obey in the front yard or a park where another dog is 100 yards away.
Try random reinforcement – sometimes give your dog a treat, other times don’t. This will get your dog to gamble. Somedays they’ll get none and others they might get 10! If your dog never knows if they will win, then they will always fail, so doing this keeps them on their toes.
If when you are training and your dog fails the task three times, make the ask easier. Making the task too difficult will only make you both frustrated and sets your dog up to fail.