In this paper we propose a novel framework that aims to jointly design the reflection coefficients of multiple reconfigurable intelligent surfaces (RISs) and the precoding strategy of a single base station (BS) to optimize the tracking of the position and the velocity of a single multi-antenna user equipment (UE). Differently from the literature, and to keep the overall complexity affordable, we assume that RIS optimization is performed less frequently than localization and precoding adaptation. The optimal RIS and precoder strategy is compared with the classical beam focusing strategy and that which maximizes the communication rate. It is shown that if the RISs are optimized for communication, the solution is suboptimal when used for tracking purposes. Numerical results show that it is possible to achieve the 6G positioning requirements in a typical indoor environment with only one BS and a few RISs operating at millimeter waves.