Once the gum has been removed, there may still be a residual of sugar left on the carpet fibers. Over time if it is not removed, the sugar will attract soil and lead to staining. To ensure the sugar is removed, dab carpet cleaning solution (one that is approved for your carpet type) onto a rag and begin blotting the area. The carpet cleaner will break down the sugar allowing it to be absorbed onto the rag helping to eliminate the chance of staining.
This ice-method also works well for shoes. To remove gum from the bottom of your shoe, place your shoe in a plastic bag and put it in the freezer. Let the gum freeze and using a blunt edged object, begin chipping the gum away. Your shoe should be gum free in no time.