Allow the dog to track the treat across

When in position, put treat onto his tongue.

Get the treat out of the picture ASAP.

Teach the dog that getting into visit position is how to get the treat to come out of your pocket.

We're told not to allow young pups into visit position (I think for orthopaedic reasons).

To teach visit to puppies, sit on the floor.

Don't push down on his head. (He'll push back, thereby moving his head away from your leg.)

If you can't resist pushing on the dog, push gently up from under the chin. Reinforce the dog for gently pushing back (and into position)

Then add duration. He should hold the visit until told 'Off' or another command.