First flush diversion[edit source]
With any rainwater catchment system, you probably want to install a first-flush diverter rather than feeding directly to your storage. When it starts to rain, the first few minutes of rainfall have the effect of cleansing the roof of dust, pollen, loose flakes of paint and bird poop off the roof surface. This water contains stuff you don't want to feed to your garden.
For a simple diverter, continue the downpipe to just above ground level and cap it, making a small diameter (2-3mm) hole in the cap. Put a junction branching off to your collection system at an appropriate height (you will need to divert more water for a larger area of roof). When it starts to rain the first, contaminated, water goes to the bottom of the downpipe, and by the time the water overflows at the branch to your collection/storage system, the water should be much cleaner. Over time, the first-flush water will drain out the small hole at the bottom (to wherever the stormwater was going before you installed the system).
The bottom of the downpipe will need periodic maintenance to clear out solid matter which may clog the drain hole. Thus the cap should be a screw-on fitting. You may be able to come up with some means of easily checking if the pipe needs cleaning out.