We introduce a tensor decomposition of the $\ell$-adic Tate module of an abelian variety $A_0$ defined over a number field which is geometrically isotypic and potentially of $\mathrm{GL}_2$-type. We use this decomposition as a fundamental tool to describe the Sato-Tate group of $A_0$ and to prove the Sato-Tate conjecture in certain cases. This is joint work with Francesc Fité.