Teaching a cue to "warn" the dog that something inappropriate is going to happen is handy. Sort of a private head's up....if they can hold out and endure...they'll be rewarded for their efforts at the very least...and some dogs end up being conditioned to enjoy .....
All the dogs in our Obedience trial prep class were struggling with this. You could see them trying to sniff the hand coming at them, or duck to the side or almost lie down, squinting....when a stranger or even their humans did it. Not one happy, open mouth, lean into the pat on top of the head!
I got ticketed (kinda like a gold star) for working with Keegan on the sideline putting my hand over top of his head and giving him a treat at the same time. Then in the next class Miles (cutie putie beagle) was struggling as well so Rita (trainer) asked Juergen, his human to pick a word and do the same.
1-name it.... I called it "bonk", Juergen called it "top"....whatever works for you
2-put your hand above head and treat at the same time, then take your hand away....repeat until dog no longer shows signs of stress ( short 10sec sessions then play or do something else,repeat a couple tmes a day. Think about how annoying it would be if you had to endure this!)
3-then say cue as you put your hand on head (gently)and treat at the same time, then take your hand away, repeat a couple times a day and in no time...you've put the pat on the head on cue!
4- fade use of treat when you notice your dog looks forward to the pat on the head. Then use the occasional treat and mix in life rewards....ie "bonk" then we play ball. Then have family and friends do the same....
5- you'll see in the video that Keegan starts to anticipate the hand on head and doesn't move any longer as he knows he'll be rewarded for my rude behaviour :)
6- if you name and desensitize, counter condition, then you take the guess work out for the dog of what's about to happen and can warn the dog in advance of what"s coming. Plus...I can empathize... as a kid I had an uncle who pinched my cheeks when saying hello...but then gave me a chocolate. I learned to tolerate it. The chocolate sure helped!
As you can see plain as day...Keegan's ears go flat, squints eye, dips head waiting for impact...he doesn't have a happy, open smiley mouth, nor does he lean into the hand....so not enjoying it at first but then sees the point of the exercise.