When connected to my home network, I only use the Facebook app on my phone. I never log into Facebook via a browser on my laptop or other computer connected to my home network.

How is it possible that when I search for something on Google on any computer connected to my home network, I am soon after targeted by ads relating to what I was searching for, through the Facebook app on my phone.

I understand that the my public IP address will be the same when I use any device on my home network connecting to the internet.

However, how is data getting shared exactly in detail? I search for something on Google on any computer on my network. Then Google or websites know my IP address and track my activity, ok, but how do I then get targeted via ads via the Facebook app on my phone?

It's clear that Facebook will know my public IP address, and so will Google and websites, but where is the connection and how does my IP address get shared? Thanks

  • 1
    Your question revolves around the murky world of data collection, data brokers, and data monetization. The inner workings of this world are opaque at best, but we know that data that we leave behind from much of what we do online is collected, bought, and sold in near real time. Related: security.stackexchange.com/questions/252566/…
    – mti2935
    Commented Jul 17, 2022 at 0:20
  • Probably doubleclick + chrome account (or some other account you use on both devices): adexchanger.com/analytics/… Commented Sep 8, 2022 at 22:18
  • If it's on your own computer and your phone is also connected to your home network, IP address would be a good guess. Commented Jan 5, 2023 at 0:52
  • Are you using email to login to facebook or google account/open id ? If the latter, then there the connection. Do you share browser profiles between the computer and mobile? There is another connection there. Commented Jan 5, 2023 at 12:08

2 Answers 2


However, how is data getting shared exactly in detail?

We don't know, and will never know how our data is collected and shared exactly. But you can expect that as good as everything is known about you.

Then Google or websites know my IP address and track my activity, ok, but how do I then get targeted via ads via the Facebook app on my phone?

Many websites include trackers, including Facebook trackers. Based on the search results you've clicked, Facebook will know what search queries have been done from your IP connection. Most straightforward, they could just push related ads to everyone on your home network. But it may also be possible they have pinpointed your phone and computer to you individually, and thus know even better who to target.

Bottom line: you can never know for sure, but the fact that this was both within the same network makes the targeting not that obscure.

  • This is the reason why it's important to block trackers. Commented May 4, 2023 at 23:00

Like the other comments suggested, Facebook's advertising algorithms are a very closely held secret. However, we can make some assumptions about how they work. Below is my personal speculation:

Search history

You also mentioned you "googled something". That adds another element to the equation, now we have a google account potentially tied to this activity as well. It is very possible that those two ad services have shared your data, or that the website you visited shared your data. In addition, patterns will emerge in your search history. If you really like a certain model of car, your searches, across all your devices, will have a higher concentration of those types of searches than other users.

Connection information

You have a public IP address, from that address, how many facebook accounts have ever signed in? Just you? Maybe your flatmates or family? How many google accounts? What kind of housing do you live in? Do you live in a one room apartment? Or a large house? Your IP address could point back to this, but probably your search and posting history already gave google and facebook a pretty good idea of your living arrangement. So assuming you live alone, it's rather easy to be able to determine both your phone and your laptop both belong to you. If you do not live alone, it could be more difficult, but still not impossible. When your phone is not at your home, your computer is turned off. When your phone returns home, that computer turns on. By comparing what computers are on and what phones are home over a long enough amount of time, both devices could be pinpointed back to their owner rather easily.


What services are you signed into? Are any of those services the same across both devices? If so, maybe one of those services sold your information. Even if you don't use connected services, you could still be tracked based on your unrelated services usage history. You searched for recipes for apple pie on your computer, then walked into the kitchen and searched for the pie recipe app on your phone. Once could be a happenstance, but if that becomes a regular occurrence, then it would be safe to assume both devices belong to the same person.


Your phone's location is very accurate. How strong is your connection to your router at any given point in your house? Answer, it varies. Your phone and your computer will have the same connection strength if they are in the same location. This is one of the ways devices can determine where they are, but it can also be used to determine that both devices are being used by the same person.

Connected devices

Do you use headphones? Airpods? Any bluetooth device? Have those bluetooth peripherals ever been connected to both devices? Do those devices switch over from one device to the other when one is powered on or when the other receives a phone call? The patterns of your peripheral connections could also be used to pinpoint what devices you use.


All and all it's probably not just any one of these things, but rather a mixture of all of them to build a confidence score of what devices belong to which users. It might seem ridiculous that a company would go to all that effort just to show you ads, but keep in mind that these algorithms are very easy to run, and advertising is very, very big business. When there is that much money on the line, it's not surprising that companies will put a lot of effort into serving the most targeted ads.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .