"before".
Besides, it's good they know the programme I'm currently watching - they can customise the advert accordingly - this is analogous to an online advertiser knowing what web site he/she is advertising on, which is fine, and doesn't require tracking the viewer.
Personally, I'd prefer to see (on this page) adverts for virus scanners than adverts for a sound system I bought last week.