This is basic compression, and not a trick at all. You wouldn't do this when sending in your stuff for a mastering, because it will squash the track and you will lose a bit of dynamic range. This step should be done during mastering, and should be the last part of the chain. Now this isn't to say that you shouldn't compress at all before mastering. Compression during the mixing stage is used for level equalization and "glueing" of track elements (drums, bass, etc) using bus compression. Adding a compressor and a limiter on a master is the last step in production.
A better way of doing this is adding a multiband compressor and doing the same thing but with tweaks to each band. This will allow greater control and can result in a cleaner sounding mix.
IANA Mixing/Mastering engineer, so take anything I said with a grain of salt.