An ad network is a company that connects advertisers to websites that want to host advertisements. Ad networks acquire available inventories from a publisher and sell them to advertisers as packaged impressions. Within the ad ecosystem, publishers work as an intermediary between publishers and advertisers, acting as a crucial monetisation component. Without such networks, publishers would need to negotiate deals with each individual advertiser. These networks compete on price per click but also on delivering the best traffic. When you are logged in In a Google product (for example Gmail or YouTube), Google knows how you are and what your interests are based on the all the past data you gave. Facebook has a similar advantage, they are used so intense that it gives them a lot of data on you. This data gives them a huge advantage that you can see back in the ranking below.