Dogs scratch the ground after they poop to leave a visual signal of their presence. They also deposit scent from the glands in their paws which is scent marking, another signal that they have been present at that place. Less commonly dogs scrape the ground after peeing.
These signals are almost identical to those made by the wild cats. A dog scratches the ground with their hind feet but don’t touch their poop. At one time it was thought that they were covering their poop as a kind of hygienic form of behaviour perhaps to hide their presence. It appears that the opposite is true.
Domestic dogs still do it as a behavioural remnant inherited from their wild ancestor the grey wolf. The scratching is carried out quite vigourously. The big cat species do exactly the same thing, such as the mountain lion in America. They will scratch the ground and leave scrape marks but they don’t have to poop beforehand. They just do it independently of other behaviours.
Obviously, humans cannot smell the scent deposited by the dog when they scrape the ground. But for other dogs it is highly “visible” and easily picked up as a marker that another dog has been present there. I’ll speculate and state that the slow deterioration in the strength of the scent might also provide information as to when they were there.
It may be true to that when a visual marker such as scraping the ground gradually fades that too provides an indication to another dog as to when the dog that made it was there. It’s a way of keeping time or diarising the movement of other dog
It should be noted that the only efficient sweat glands on a dog’s body are those between the toes. When a dog scratches on the pavement they are in effect wasting their time in terms of a visual marker but it is carried out entirely instinctively without rational thought as to whether it is effective or not under the circumstances.
SOME MORE ON DOG BEHAVIOR: