If you want to tailor a Facebook ad to a single user out of its universe of 2.2 billion, you could. Trying to pitch your boutique bed and breakfast to a 44-year-old "trendy mom" who lives in Seattle, leans conservative and is currently traveling in the Toronto area but hasn't booked a hotel for the night yet? Go right ahead. Interested in mail-ordering pet treats to a 32-year-old cat owner in Madison, Wisconsin who enjoys Japanese food, doesn't like pizza and has an anniversary coming up in the next two months? Not a problem.

Targeting ads, it turns out, is almost infinitely customizable — sometimes in surprising ways. The ads you might see can be tailored to you down to the most granular details — not just where you live and what websites you visited recently, but whether you've gotten engaged in the past six months, are interested in organic food or share characteristics with people who have recently bought a BMW, even if you've never expressed interest in doing so yourself. Facebook made $40 billion in advertising revenue last year, second only to Google when it comes to its share of the global digital advertising market. Even with a recent decision to stop working with outside data brokers to help advertisers target ads based on things like offline purchases or credit history, this number is expected to grow sharply this year. Here are some ways advertisers can target you through Facebook:

Monitoring your Facebook activity

By now you've probably gathered that Facebook uses things like your interest, age and other demographic and geographic information to help advertisers reach you. Then there's the stuff your friends do and like — the idea being that it's a good indicator for what you might do and like. So, if you have a friend who has liked the New Yorker's Facebook page, you might see ads for the magazine on your Facebook feed. But that's just the tip of the iceberg. Facebook and advertisers can also infer stuff about you based on things you share willingly. For example, Facebook categorizes users into an "ethnic affinity" based on what it thinks might be their ethnicity or ethnic influence. It might guess this through TV shows or music you've liked. Often, Facebook is wrong — and while it's possible to remove it, you can't change it. There is also no "ethnic affinity" option for whites. While there are plenty of good reasons advertisers may want to target people of a particular ethnicity, this became a problem for Facebook in 2016, when ProPublica found that it let advertisers exclude specific ethnic groups from seeing their ads. When it comes to housing and employment ads, this is illegal. In late 2017, Facebook said it was temporarily blocking advertisers' ability to target based on ethnic affinity, along with other things such as religious or LGBT affinity. Advertisers can still target those groups — just not exclude them. Facebook, which said it is conducting an audit of how the feature can be misused, did not say when it would lift the block. While some advertisers want to reach large swaths of people, others like more specific targeting. As Facebook explains in a guide for advertisers, it's possible to refine an ad's audience on things like what people post on their timelines, apps they use, ads they click, demographics such as age, gender and location, and even the mobile device they use or their network connection. Based on this information, advertisers can either include or exclude categories such as homeowners, "trendy moms," people who moved recently, conservatives, or people interested in cooking, for example. That said, Facebook warns advertisers not to narrow their audience too much by being overly specific, which can make the ads less effective — since fewer people will see them.

Following you off Facebook

An ad offering called "custom audiences" lets advertisers target anyone who has already bought stuff from them or has visited their websites. They can also target anyone who has shared an email address or downloaded their app. So, if you use Netflix, you may see an ad on Facebook for a new TV show that might interest you. Or, if you gave your email address when you bought a pair of slippers from Land's End, you might get an ad for an upcoming slipper sale, since Facebook has your email address too. Then there are "lookalike audiences." These are people who are similar to a business's existing customer base, but are not customers themselves. This can help advertisers reach people in different countries, for example. Advertisers can use this tool by first uploading their customers' data through the "custom audiences" feature. Then, Facebook's algorithms look for people similar to them. In addition, advertisers can also install a Facebook "pixel" on their site, a piece of code that tracks what people do off of Facebook.

Dynamic ads