Facebook gathers information about what you buy – both online and in physical stores – in order to serve you ads that correspond to those purchases.

The practice is one of many ways Facebook leverages its wealth of user data to offer advertisers tools to target specific audiences.

This is a breakdown of how Facebook learns about your offline activity, and how to opt out.

Visit Business Insider’s homepage for more stories.

If you recently bought something at a physical store, you might have noticed an uptick in the number of Facebook ads you saw related to that store or the item you bought.

The phenomenon – which has been documented by Reddit and Twitter users – is not a coincidence.

Through its partnerships with retailers, Facebook learns about what users are buying, both online and in brick-and-mortar stores. That data is ultimately used to target ads to people, based on what they’re likely to spend money on.

Any business can send opt to send Facebook information about customers, including identifying information like an email, name, or phone number, and a record of what they bought. Facebook matches that information to user’s profiles, allowing the business to advertise to those people directly on its apps.

The advertising service is already being used by a range of Facebook’s advertising clients, including Macy’s and Dick’s Sporting Goods.

Facebook rolled out an „off-Facebook activity“ tool in August that allows users to view how the social network gauges their activity off the site.

Ad money comprises the lion’s share of Facebook’s revenue – of the $17.6 billion the company made in the third quarter of 2019, $17.3 billion came from ads. Part of what makes Facebook appealing to advertisers is the fine-tuned demographic information on users it offers, borne out through its tools that allow for hyper-targeted ads.

Business Insider asked Facebook to explain how it learns about people’s offline purchases. Here’s how the process works, and how to opt out.

The process begins when you buy something, either online or in a store. The retailer may retain information about you from the purchase.

Foto: sourceHunter Martin/Getty Images

If that retailer wants to target those customers with Facebook ads, it can send Facebook details of what was purchased, along with information that could match that purchase to a Facebook profile.

Foto: sourceGetty Images

Personally-identifying information sent by the business could include your name, email, phone, or date of birth.

Facebook only needs a few data points from retailers in order to create a „custom audience,“ or a group of users it determines have shopped at that retailer.

Foto: sourceReuters

According to a study published earlier this year, algorithms are capable of confidently identifying people based on just a few anonymized data points – and few companies have as much user data as Facebook.

All identifying information is hashed before it’s sent from retailers to Facebook and subsequently deleted after being used to match a user to a purchase, according to a Facebook spokesperson.

Foto: sourceAssociated Press

Hashing is a common data-privacy practice that converts plain-text data to code that can only be read by an algorithm.

After the hashed data is deleted, what remains is the match — that is, Facebook has used the information from retailers to match specific user profiles to that business.

Foto: sourceNOAH BERGER/AFP via Getty Images

From there, the retailers can buy ads on Facebook that will be shown directly to the „custom audience“ of users matched to them.

Foto: sourceGetty

Several retailers use these ad tools, including Macy’s and Dick’s Sporting Goods.

Foto: sourceBusiness Insider/Jessica Tyler

„With store visits custom audiences, we re-engaged customers who had visited one of our stores with a targeted Facebook ad,“ a Dick’s Sporting Goods spokesperson said in a statement. „And, using lookalike audiences, created from people similar to those who visited our store, opened up a broader audience of new customers for us to reach, driving incremental foot traffic and sales.“

A Macy’s spokesperson said the retailer has used Facebook ads to drive more in-store sales.

„We are encouraged by the positive results we saw in-store and are excited to continue testing Facebook’s offline suite to fuel our growth,“ the spokesperson said.

Users can opt-out of being served ads based on offline events by going to their Facebook settings, selecting „Ads,“ and disallowing „ads based on data from partners.“

Foto: sourceFacebook

The „ads“ section of Facebook’s user settings can be found here.

Facebook also offers a tool to let people check whether an ad is specifically targeting them. To use the tool, select „Why am I seeing this ad?“ from the dropdown menu on the top right of the ad.

Foto: sourceFacebook