Best placement for traps

Where would I need to place traps for the most effective use? Is it best to have barbed way in the middle of mortar range or near a building in front of defences that has high health to distract enemies longer? Would ambush traps be best used inside or outside walls near defences?