Never had this on a carpet but get lots when doing builders cleans.
It is tough enough getting off UPVC frames etc. We tend to use Siroflex Solvent Cleaner or another Acetone based cleaner that we also use. Often we have to use a scraper and occasionally a magic eraser aswell.
Getting it off a carpet, I'd imagine would be a nightmare. I'd suggest scraping / shaving as much away as possible. Steam may work (although never tried it). Last resort would be a solvent, but it is the solvent + enthusiastic agitation that does the trick on UPVC so you'll have to try to emulate this someway if you can't just shave the stuff away.