When a dog begins eating dirt it could be as simple as they just like the dirt or they could have a mineral deficiency and they are trying to get the minerals and vitamins and as well as beneficial and good Probiotic bacteria from the dirt.
Sometimes the way to correct the dog eating dirt is to change their diet and make sure they get those vitamins and minerals.
A dog eating dirt is not much of a concern and they will not get any harm done to them when eating small amounts of dirt.
Dirt is actually nutritious to the dogs as well as humans and even when kids eat some dirt they will be perfectly okay.
My son used to eat dirt when he was 2 years old and 3 years old and he's now 13 and perfectly fine and I also had a dog that would eat dirt as well.
The dog will be okay when eating dirt and there's nothing wrong with it.
Eating the dirt is much healthier than eating poop so if a dog can eat their own poop they can eat dirt as well.