Basically all carpet deodorizer is is Baking Soda, which is an excellent odor absorber.
You sprinkle the baking soda onto the carpet, let it sit for at least fifteen minutes (preferably overnight), and then hoover up the baking soda and the unwanted smells.
The best thing about making your own is you get to choose your own scent, if any, you want to add to your carpet while removing the bad smells.
Simply add 7-10 drops of essential oil combined with 1 cup baking soda (Hint: the essential oil will tend to clump in the baking soda, and you must try to break up the clumps and evenly distribute the oil throughout the baking soda before it is sprinkled on the carpet)
and VOILA! you have your own deodoriser.