It depends on the situation that tracking ex husband after divorce does not violate the law. If it is just tracking, it does not violate the law.
If a party follows his ex husband to create conditions or make preparations for a crime, such an act belongs to criminal preparation.
However, criminal preparation can only bear criminal responsibility in a few cases of serious crimes. Such as preparing to kill or rob.
[Legal basis] According to Article 22 of the Criminal Law, preparing tools and creating conditions for a crime is criminal preparation. A preparatory offender may be given a lighter or mitigated punishment or exempted from punishment in comparison with a completed offender.