Here are some tips and tricks to help keep unwanted dogs off of your lawn. Plant lavender. ... Spray vinegar. ... Use a motion-activated sprinkler. ... Build a fence.To keep animals like dogs from constantly coming in and out of your lawn, surround it with a sturdy fence. Plant spiky shrubs.