I’m sure that the IP address is used to determine this. I’d be willing to bet money.
Why am I so confident? Because when I browse from work I get ads for “Dayton mom discovers secret to white teeth” and “Columbia mom earns $[some forgotten/ignored amount] working from home!”
“But you don’t live in Dayton or Columbia!” I can hear you saying. “If I remember from your posts, you live in Winnipeg!”
True, and I work here too, but the world headquarters for my company is in Dayton. My office also has a sister office in Columbia, South Carolina. Both of those offices (as well as my own, sadly) are moving to Atlanta in a few months and I sometimes get Atlanta ads as well. Now, while I find the switch in ad locale somewhat jarring at times, it at least proves my theory that it’s IP based. I never see Winnipeg-branded ads (not even at home, for some reason the “local mom” ads never show up at home, making me think it’s an American thing.)
This also helps when I encounter the odd website (like hulu) that doesn’t work in Canada, I don’t have to cross the border to view the content, I just wait until I’m at work!