The carpets in our house are now 18 months old. I am surprised that we have had no major problems with them with regards to them getting dirty. They are well protected and we made the right choice with regards to entrance mats which has helped. We have had a couple of spillages but only if drips of green tea or water. We have also had blood on the carpets on a selection of occasions form nosebleeds. Luckily we now know that if you quickly blot, then blot with damp and dry clothes alternatively you can get the blood out, as long as you do it before it dries. The carpet has a slightly orangey speckle in it, which also means that it is well camouflaged as well.
I also do not allow children to have drinks on the carpet except water and only dry food like plain biscuits or crisps or other food if they are sitting on a rug. I keep a towel on every floor as well so spillages can quickly be blotted if necessary.
I was so worried about getting carpets when the children were only six years old. But it shows that if you are careful to reduce the risk of problems, then it can stay clean.