Most dogs start of having a piss in the squat position as they mature they start to cock a leg occasionally then nearly all the time,some dogs start to scratch their legs on the floor and flick soil,they are just marking their territory the flicking soil just throws their sent over a wider more noticeable area for others to smell.
Ive had this issue before its a case of catching them mid squirt or before if you think they are going to do it,just try and brake the habit before it becomes one,,,,,,,otherwise its a cage or outside no way will you your wife or kids will put up
with yellow stains