i am not an expert, but have had the problem myself
we dug 2 trenches either side of our garden about 1 metre away from the fences. going from the house to the end of the garden.
12 - 18 inches deep
we placed guttering pipes all along (cheap way)you can buy special pipes with holes cut...