Having a carpet continually generate loads of static electricity just isn't that much fun. This tends to be frustrating for everyone who has to live with the carpet. However, by taking a few simple steps, you can reduce the amount of static your carpet generates and make it much easier to live with.
Commercial Anti-Static Sprays
One easy treatment for static on carpets is to use a commercial anti-static spray. A number of different companies make these types of products. You only really need to spray the product in high-traffic areas where people might generate static. Don't worry about reaching hard-to-reach or out-of-the-way areas of the carpet.
Anything you do that increases the humidity in the house will reduce the amount of static buildup on the carpet. If you have a humidifier, running it will help prevent static from accumulating. On days when it is more humid outside than it is inside the home, open windows and doors to introduce more humidity into the house. If nothing else, you can run a hot shower in the bathroom and open the door to let steam and humidity escape into the rest of the house.
Homemade Static Treatment
You can make a homemade version of a commercial anti-static spray. Combine a small amount of liquid fabric softener with water and shake it up inside a spray bottle. Spray a light dusting of the treatment over the parts of the carpet used the most often. Keep the bottle handy during the winter or other dry times and treat the carpet regularly to stop static from building up.
This is a solution that costs a bit more money, but it is effective enough to be relied upon by companies dealing with valuable electronics. A static discharge caused by buildup from walking on carpet can easily damage sensitive electronics, so these companies need to prevent static buildup to protect their investments. A balanced-polarity air-ionizer fan is used in these situations. This doesn't actually remove the static but instead conducts the energy away so static shocks and discharges don't occur.