Tracking based on the gradient fields of magnetic resonance imaging (MRI) scanners based on passive operation of the tracking system without any change of the scanners hardware or mode of operation. To achieve better tracking performance, a technique to create a custom MRI pulse sequence is disclosed. Through this technique any standard pulse sequence of the scanner can be modified to include gradient activations specifically designated for tracking. These tracking gradient activations are added in a way that does not affect the image quality of the native sequence. The scan time may remain the same as with the native sequence or longer due to the additional gradient activations. The tracking system itself can use all the gradient activations (gradient activations for imaging and gradient activations for tracking) or eliminate some of the gradients and lock onto the specific gradient activations that are added to the custom pulse sequence.