Preferential sampling in geostatistics refers to the instance in which the process that determines the sampling locations may depend on the spatial process that is being modelled. If ignored, this dependency can result in biased parameter estimates and may affect the resulting spatial prediction. Recent research on correcting for preferential sampling bias has been limited to stationary sampling locations, such as air-quality monitoring sites. We show how modern numerical methods implemented via the R package 'Template Model Builder' can be used to expand preferential sampling methodology to the case in which the preferentially sampled locations are obtained from a process moving in space and time. An example of such data, the preferential sampling of Ocean temperature by tagged marine mammals, is presented.