An analysis of the dynamics of colloids in shear flow can be challenging because of the superposition of diffusion and advection. We present a method that separates the two motions, starting from the time-dependent particle coordinates. The restriction of the tracking to flow lanes and the subtraction of estimated advective displacements are combined in an iterative scheme that eventually makes the spatial segmentation redundant. Tracking errors due to the neglect of lateral diffusion are avoided, while drifts parallel and perpendicular to the flow are eliminated. After explaining the principles of our method, we validate it against both computer simulations and experiments. A critical overall test is provided by the mean square displacement function at high Peclet numbers (up to 50). We demonstrate via simulations how the measurement accuracy depends on diffusion coefficients and flow rates, expressed in units of camera pixels and frames. Also, sample-specific issues are addressed: inaccuracies in the velocity profile for dilute suspensions (volume fraction ≤0.03) and tracking errors for concentrated ones (VF ≥ 0.3). An analysis of experiments with colloidal spheres flowing through microchannels corroborates these findings and indicates perspectives for studies on transport, mixing, or rheology in microfluidic environments.