Getting pretty late to book in Yellowstone Park itself. You might be able to cobble together camping in several different campgrounds by moving every couple of days. First come first served CG's in the park are tough to get into and it often means waiting at the CG entrance by 7:00 in the morning.
There are private CG's in West Yellowstone and also a few NFS CG's north of West Yellowstone. The downside of those places is the line at the west entrance to get into the park every morning.
Wherever you decide for Yellowstone, I'd get reservations NOW (today!!!).
For Glacier, we stayed at Apgar on the west side a couple of years ago and didn't have a problem getting a spot. With the time you have alloted for this trip, I'd also try to stay on the east side as well as the two sides are different. You can check for resevations at Many Glacier but you have to get them at 8:00 a.m. MST six months out. So if you can get a spot tomorrow it will be for July 17th. I didn't have luck with the push the enter button lottery last time I tried. Resevations are also available at St. Mary at the east entrance main road. Many Glacier and Two Medicine both sit on lakes at the end of glacially carved canyons and have amazing settings. Lines for the First Come First Served can start before 7:00 a.m. for busy times in the summer.
THe NPS has a really handy webpage that shows the fill times for the CG's in the park. You can look at any specific date for a given year or get the average fill time for the last five years.
CG fill time info Click on the individual CG then on the month you want to look at.
BTW you can't tow across Logan Pass so you'll have to take US 2 around the south end of the park. Plan a day to move.