Facebook CEO Mark Zuckerberg testified in front of the US Congress last week, answering “more than 500 questions” and assuring to get back on some more. The company has now tried to clarify on questions how it collects data even when people are actually logged out of the website or the app.

Facebook says it can collect personal data as many websites and apps use the social networking giant’s services to make their content and ads more engaging and relevant.

These services include social plugins, such as Like and Share buttons that help people share content of other sites; Facebook Login, through which one can a Facebook account to log into another website or app; Facebook Analytics that many websites and apps use to better understand how people use their services; and Facebook ads and measurement tools, using which other websites and apps show ads from Facebook advertisers to run their own ads on Facebook or elsewhere.

READ | Facebook CEO Mark Zuckerberg testimony to US Congress: ‘It was my mistake’

In a post, David Baser, Product Management Director at Facebook, wrote: “Apps and websites that use our services, such as the Like button or Facebook Analytics, send us information to make their content and ads better.”

Facebook, in return, helps those websites serve up relevant ads or receive analytics to study how people use their services.

“When you visit a site or app that uses our services, we receive information even if you’re logged out or don’t have a Facebook account. This is because other apps and sites don’t know who is using Facebook,” Baser said in his post as part of Facebook’s Hard Questions series.

There are, however, other companies too that offer these types of services and get information from the apps and sites that use them. These and many other companies offer advertising services too.

“Twitter, Pinterest and LinkedIn all have similar Like and Share buttons to help people share things on their services. Google has a popular analytics service. And Amazon, Google and Twitter all offer login features,” Facebook said.

READ | Zuckerberg: Didn’t do enough to prevent Facebook from being used to harm others

When you visit a website, the browser you use sends a request to the site’s server. Your browser (Chrome, Safari or Firefox) shares your IP address so the website knows where to send the site content.

The website also gets information about the browser and the operating system (Android or Windows for example) you are using.

“It also gets cookies, which are identifiers that websites use to know if you’ve visited before. This can help with things like saving items in your shopping cart,” Baser explained.

He added: “So when a website uses one of our services, your browser sends the same kind of information to Facebook as the website receives. We also get information about which website or app you’re using, which is necessary to know when to provide our tools.”

READ | No significant increase in Facebook users deactivating or interaction: Zuckerberg

So, what does Facebook do with data it receives from other websites and apps?

There are three main ways in which Facebook apparently uses the information it receives. According to Baser, they are: “Providing our services to these sites or apps; improving safety and security on Facebook; and enhancing our own products and services.”

While stating the above, Baser sought to clarify: “We don’t sell people’s data.”

He also claimed that the information received from websites and apps was also used to help protect the security of Facebook. “For example, receiving data about the sites a particular browser has visited can help us identify bad actors. If someone tries to log into your account using an IP address from a different country, we might ask some questions to verify it’s you. Or if a browser has visited hundreds of sites in the last five minutes, that’s a sign the device might be a bot.”

READ | Data Abuse Bounty: Facebook to now reward users who report data abuse

Baser clarified that the data received from other websites and apps also helped Facebook improve the content and ads shown on the social networking site. “So if you visit a lot of sports sites that use our services, you might see sports-related stories higher up in your News Feed. If you’ve looked at travel sites, we can show you ads for hotels and rental cars,” he said.

Zuckerberg had told the US Congress last week that his own personal data was part of 87 million users’ that was “improperly shared” with British political consultancy firm Cambridge Analytica.

Facebook has been embroiled in a massive data breach controversy ever since it surfaced that British data firm Cambridge Analytica improperly gathered information on its 87 million users.

(With agency inputs)