Hi there :) Thanks for sending us your question. I'm Dr. Sara - I'm a dog and cat vet in Pennsylvania.
When young dogs start coughing, the first notion I get is for an infectious disease. Saying "mi dog has kennel cough" is a bit like saying "I have a cold". We often don't know exactly what type of infection we are dealing with, but it is usually viral and self limiting - meaning that they get over it on their own with time. Just like kids in daycare or school, pets who go to doggy daycare or boarding kennels are at higher risk for catching "a cold", but don't let that deter you from allowing him to continue doing the bark park when he is feeling better.
As long as dogs are bright, alert, eating, drinking, and acting normally and aren't in any type of distress, I usually recommend just watching them and giving them time. Some of these illnesses can linger for weeks but he should be his happy old self and continuing to act fine aside from the cough. It's not unusual at all for them to gag up some clear to white foam.
Red flags that mean he may be in trouble include lethargy, green or yellow nasal or ocular (nose or eye) discharge, severe/constant coughing, any type of respiratory distress, or difficulty breathing. These indicate it's probably more than a passing illness and he should be checked out.
Please let me know if I can answer any other specific questions for you today, and I hope Jake is on the mend soon :)