  Recently, Nattermann and Pokrovsky [PRL 100, 060402 (2008)] have proposed a
scaling approach for studying Bose-Einstein condensates in strongly disordered
traps. In this paper we implement their scaling argument in the framework of
the variational method for solving the time dependent Gross-Pitaevskii
equation. We consider atomic gases with both short range s-wave interaction and
long range anisotropic dipolar interaction. The theory is addressed to the
regime of strong disorder and weak interactions where the physics is dominated
by the collective pinning due to the disorder. The phenomenon of condensate
fragmentation in dipolar gases is also analyzed.
