The research paper—published in the journal Frontiers in Zoology—says that dogs "prefer to excrete with the body being aligned along the North-south axis under calm MF (magnetic field) conditions." Apparently, if the MF is unstable–like when Earth is hit by a solar flare—they get confused. These were their conclusions:
It is for the first time that (a) magnetic sensitivity was proved in dogs, (b) a measurable, predictable behavioral reaction upon natural MF fluctuations could be unambiguously proven in a mammal, and (c) high sensitivity to small changes in polarity, rather than in intensity, of MF was identified as biologically meaningful. Our findings open new horizons in magnetoreception research. Since the MF is calm in only about 20 % of the daylight period, our findings might provide an explanation why many magnetoreception experiments were hardly replicable and why directional values of records in diverse observations are frequently compromised by scatter.
All I know is that, the next time I go out and find a dog's shit, I will take out my compass app and see if the alignment is complete.