Packing tape on the hat first. Then carefully spread the Tanglefoot only on the packing tape. After the walk, carefully grab an edge of the packing tape and peel the whole thing off and into the garbage. Repeat for the next day.
edit - and wear the hat backwards, Deerfly strategy is to fly around and assess it's target first, then attack from behind.