don't know if it works with every glue but sewingmachine oil (or gun oil?) on a rag wil help to remove most glue from carpets. don't know sure about the name for the oil but it's very thin clear oil used for your sewing machine.
Just looking at this post again... If the glue is only on the top fibres of the carpet, can you cut the glue out - ie carpet fibres say 5mm high all over and left with 3mm high where you have cut the glue out?