If you’re here, you’re likely annoyed or creeped out that Facebook seems to know what you’ve been searching on Google.

The short answer?

Although Facebook doesn’t know your Google searches, it does know a lot about what you do on the internet, so it gives the appearance of knowing what you’re Googling.

If you want to know more than this, like what Facebook is tracking, and how it tracks these things, read on!

It’s kind of creepy when you search for a new mattress and the next time you log in to Facebook you start seeing mattress ads everywhere! Though it’s creepy, what’s actually happening behind the scenes is actually pretty interesting.

It turns out that Facebook doesn’t actually know what you search on Google, it just looks like it does.

As a professional advertiser on both Facebook and Google, I can explain to you exactly how Facebook seems to know what you are searching for on Google.

What Facebook Can Track

Facebook doesn’t have access to your Google searches. But what do we do right after we search for something on Google? We go to a website, or two, or three. And Facebook can sometimes see what sites you went to after you searched on Google.

How Facebook Knows What Sites You Visit

Many websites advertise on Facebook, and to help track how well those ads are performing, they install a piece of code on their site. It looks like this:

An example of the Facebook Pixel code. This is on many sites, and this sends data back to Facebook about the visitors on the site.
This is the code that is installed on websites all over the internet

This code is called a Facebook Pixel. You may have heard of cookies before, and this is one of the more popular kinds of cookies.

When you visit a site that has a Facebook Pixel on it, Facebook essentially knows that you visited that site, and infers that you’re interested in the subject of that site.

If you’re curious if a site has a Facebook pixel on it, you can download a cool Chrome plugin that can show you if a pixel is installed and some of the information it sends to Facebook! This plugin is normally used for advertisers to troubleshoot their pixel, but it’s also the easiest way to see if a pixel is installed.

*Quick note: This plugin isn’t perfect and won’t catch the pixel every time. To be sure if there’s a pixel on a site, you have to look at the code itself.

So if I search for a new mattress and visit a site or two about mattresses that have a Facebook Pixel on them, Facebook is probably going to think I’m interested in buying a mattress. Then Facebook can start showing me ads about mattresses.

If you’re curious about how Facebook knows what ads to show you, check out our article on How Does Facebook Know What Ads To Show You?

So although it seems like Facebook knows that I searched for a new mattress, Facebook only knows that you visited a site or two about mattresses.

If you think about it for a minute, Google and Facebook are actually competitors and make a lot of money off of advertising to their users. They don’t necessarily want to be sharing information with each other. As an advertiser on both Google and Facebook, I could tell you a lot about the roadblocks both Facebook and Google put in the way of advertisers knowing too much about you.

So although Facebook doesn’t know your Google searches, it knows a lot of what you do on the internet, which makes it look like they know what you’re searching for.

Google, on the other hand, knows exactly what you’re searching for on the internet.