After much trial and error I finally found a cheap and easy way to do this. Pull up the carpet. Use straight bleach to remove the glue and cardboard remnants. Put bleach on the glue, let soak a few minutes, then scrape it off with a metal scraper. Make sure you have plenty of ventilation. Also, Make sure you avoid direct bleach/skin contact. Bleach can burn your skin.