The $f(R,T)$ gravity field equations depend generically on both the Ricci scalar $R$ and trace of the energy-momentum tensor $T$. Within the assumption of perfect fluids, the theory carries an arbitrariness regarding the choice of the matter lagrangian density $mathcal{L}$, not uniquely defined. Such an arbitrariness can be evaded by working with the trace of the theory field equations. From such an equation, one can obtain a form for $mathcal{L}$, which does not carry the arbitrariness. The obtained form for $mathcal{L}$ shows that the $f(R,T)$ gravity is unimodular. A new version of the theory is, therefore, presented and forthcoming applications are expected.