Bench dogs need some sort of “spring” to keep them at the desired height, otherwise you would need four hands: two to hold the dogs, one to hold the work piece being clamped and one to tighten the vise. Bazillions of good ways to do this, I like this one (I think I got it from Fine Woodworking Tips): a bullet catch (spring loaded ball bearing) in the back of the dog. It really works well; reach under the bench and smack the dog, it pops up and it stays put. I got a hundred of these from Lee Valley so I should be set for several life times.
I position the catch by drawing two lines: one with the dog all the way down in the hole and one with bottom of the dog level with the bottom of the bench (see photo). Then, I put the catch centered between those two lines, not critical. Move it down if you want to extend the dog higher. You don’t want the catch to leave the dog hole at either extreme.