{"id":180357,"date":"2024-06-19T13:07:11","date_gmt":"2024-06-19T12:07:11","guid":{"rendered":"https:\/\/liora.io\/en\/?p=180357"},"modified":"2026-02-12T13:20:58","modified_gmt":"2026-02-12T12:20:58","slug":"how-does-the-facebook-ads-algorithm-work","status":"publish","type":"post","link":"https:\/\/liora.io\/en\/how-does-the-facebook-ads-algorithm-work","title":{"rendered":"How does the Facebook Ads algorithm work?"},"content":{"rendered":"\n<p><strong>Have you ever seen an ad on your Facebook or Instagram feed that relates to your passion, sporting activity or interests? It&#8217;s perfectly normal. Meta (the parent company of Facebook and Instagram) offers today&#8217;s most personalized advertising experience. <\/strong><\/p>\n\n\n\n<p>With over 15 million active ad campaigns on the planet every day, Facebook is the world&#8217;s second largest ad provider (after Google). But how is a specific ad selected by the <strong>Facebook Ads algorithm<\/strong> to be shown to a user? How does Facebook sort advertisers and manage bids from different companies wishing to show their ads? In short, how does the Facebook Ads algorithm work? Answers in this article.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-general-architecture-of-the-facebook-ads-algorithm\">The general architecture of the Facebook Ads algorithm<\/h2>\n\n\n\n<p>Taking a step back from the <strong>technical side of things, choosing which ads to serve to a user via Facebook Ads<\/strong> is pretty straightforward. <a href=\"https:\/\/liora.io\/en\/refactoring-databases-and-code-comprehensive-guide-to-the-essentials\">The algorithm fetches ads from a database<\/a>. It ranks them according to the likelihood of the user clicking on the ad.<\/p>\n\n\n\n<p>The bidding process begins and the ad is selected for delivery to the user. These steps may seem simple, but in detail each one is particularly technical. Let&#8217;s take a closer look.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/2023\/07\/Fichier-57-8.png\" alt=\"\" title=\"\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ad-selection-in-the-database\">Ad selection in the database<\/h3>\n\n\n\n<p>In the <strong>Facebook Ads database,<\/strong> there are generally between 10 and 100 million ads ready to be served (or in the process of being served). The algorithm then applies a<strong> filter to eliminate all ads not relevant to the user&#8217;s profile.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/2023\/07\/Fichier-56-8.png\" alt=\"\" title=\"\" \/><\/figure>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center wp-container-core-buttons-is-layout-675d14d2\" style=\"margin-top:var(--wp--preset--spacing--columns);margin-bottom:var(--wp--preset--spacing--columns)\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/liora.io\/en\/courses\/\">Learn how to use Facebook Ads<\/a><\/div>\n<\/div>\n\n\n\n<p><strong>Meta<\/strong> will then use the characteristics of the user&#8217;s profile:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Age, gender, language, location, number of friends, number of pages liked for a specific interest, number of friends with the same interest.<\/li>\n\n\n\n<li>The implicit meaning of the user&#8217;s profile text and profile photo.<\/li>\n\n\n\n<li>User ID, number of pages visited by the user, IDs of closest friends.<\/li>\n<\/ul>\n\n\n\n<p><strong>Meta<\/strong> also detects the particular context the user is in, such as a time of year, time of day, holiday, birthday or election period. For example, a user living in Lille in January will not see ads for swimwear.<\/p>\n\n\n\n<p><a href=\"https:\/\/liora.io\/en\/algorithm-what-is-it\">The algorithm also details the characteristics of the ad:<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When the ad campaign was created, the number of ads created by the advertiser,<\/li>\n\n\n\n<li>The meaning of the visual ad, the meaning of the text&#8230;<\/li>\n\n\n\n<li>The ad&#8217;s ID, the IDs of ads in the same ad account&#8230;<\/li>\n<\/ul>\n\n\n\n<p>Finally, the algorithm will analyze the interactions between the user and ads on Meta platforms:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The number of times the user clicks on an ad, what types of ads they tend to click on&#8230;<\/li>\n\n\n\n<li>The type of ads the user clicks on, which ones they see&#8230;<\/li>\n<\/ul>\n\n\n\n<p>This first step in the process keeps between 100,000 and 1 million potential ads.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/2023\/07\/Fichier-55-8.png\" alt=\"\" title=\"\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ad-ranking-by-the-facebook-ads-algorithm\">Ad ranking by the Facebook Ads algorithm<\/h3>\n\n\n\n<p>The <strong>algorithm<\/strong> goes through two stages to sort the maximum number of remaining ads: a fast sort and a slower sort to ensure that the right ad is displayed.<\/p>\n\n\n\n<p>First, the <a href=\"https:\/\/liora.io\/en\/page-rank-algorithm-all-you-need-to-know\">algorithm<\/a> has to manage a large number of ads and filter out those most relevant to the user&#8217;s profile, being relatively fast to minimize waiting times. In this case, Meta uses a subset of features that give it this speed of execution. This first ranking keeps between 100 and 1,000 potential ads.<\/p>\n\n\n\n<p>Next comes the slower ranking of the remaining ads. The <a href=\"https:\/\/liora.io\/en\/classification-algorithms-definition-and-main-models\">algorithm<\/a> then uses a more complex model to promote precision and better predictive performance. Only the best-ranked ads are retained for the next phase. At the end of this stage, only ten or so potential ads remain.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center wp-container-core-buttons-is-layout-a89b3969\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/liora.io\/en\/courses\/\">Training in Digital Marketing<\/a><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-auctions-work\">How auctions work<\/h3>\n\n\n\n<p>As a reminder, <strong>Facebook Ads works on a Pay-Per-Click (PPC) basis<\/strong>, meaning that an advertiser only pays when a user clicks on the ad. Meta therefore takes into account the daily budget set by the advertiser for a certain period when creating the campaign.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/liora.io\/en\/knn-what-is-the-knn-algorithm\">algorithm<\/a> estimates the cost the advertiser is willing to pay per click. Ads are then ranked according to their offer and the likelihood of the user clicking on the ad. The winning ad is shown to the user.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/2023\/07\/Fichier-54-8.png\" alt=\"\" title=\"\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-is-the-bid-calculated\">How is the bid calculated?<\/h2>\n\n\n\n<p>Now that you&#8217;ve understood how an ad is selected and the types of criteria taken into account by the <strong>Facebook Ads algorithm,<\/strong> it&#8217;s time to find out how the bid is calculated. This is a key factor in determining which ads are shown and which are not. This process allows ads to be organized according to the advertiser&#8217;s offer and the quality of the ad. The formula can be summarized as follows:<\/p>\n\n\n\n<p>Ad ranking = Bid X p(user will click) + Ad quality<\/p>\n\n\n\n<p>\u2192 The bid corresponds to the maximum amount an advertiser is willing to pay to get one click on its ad.<\/p>\n\n\n\n<p>\u2192 P(user will click) corresponds to the probability calculated according to the recommendation model.<\/p>\n\n\n\n<p>\u2192 Ad quality corresponds to an estimate of the relevance of an ad based on users&#8217; actions vis-\u00e0-vis that ad.<\/p>\n\n\n\n<p>When creating an advertising campaign, the advertiser generally does not specify a specific bid. Instead, they define a daily or campaign budget and its duration. For example, the advertiser defines a 7-day campaign for a budget of \u20ac100. Meta will then estimate how many times the ad is likely to be shown.<\/p>\n\n\n\n<figure class=\"wp-block-image\" style=\"margin-top:var(--wp--preset--spacing--columns);margin-bottom:var(--wp--preset--spacing--columns)\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/2023\/07\/image2-2.png\" alt=\"\" title=\"\" \/><\/figure>\n\n\n\n<p>To return to our example, let&#8217;s imagine that the estimate is 35,00 times in 7 days. If the click-through rate is 1%, then the number of clicks will be 35,000 x 0.01 = 350. The cost per click is therefore 100 divided by 350, or around 30 cents. Based on the advertiser&#8217;s initial budget and average click-through rate, Meta is able to calculate a bid value for the campaign. This bid can be adjusted over the course of an advertising campaign according to results, budget and days remaining.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-facebook-ads-algorithm-at-a-glance\">The Facebook Ads algorithm at a glance<\/h2>\n\n\n\n<p>The<strong> Facebook Ads algorithm<\/strong> is used to show the most relevant ads to users. It includes various filters to sort the millions of ads in its database and then applies an auction to determine which ad will be shown to the targeted user.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center wp-container-core-buttons-is-layout-a89b3969\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/liora.io\/en\/courses\/\">Discover our Digital Marketing training<\/a><\/div>\n<\/div>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How does the Facebook Ads algorithm select which ads to show?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"The algorithm runs a real\u2011time auction and ranks ads by combining the advertiser\u2019s bid, the estimated likelihood that a user will take the desired action, and an ad quality or relevance estimate to decide which ad wins and is displayed.\u00a0([turn0search0][turn0search19])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What factors influence the ranking of ads on Facebook?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Ads are ranked based on the bid amount the advertiser is willing to pay, the predicted probability the targeted user will engage with the ad, and a quality or relevance score that reflects user engagement and ad usefulness.\u00a0([turn0search0][turn0search1])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Does the highest bid always win the Facebook ad auction?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"No \u2014 the ads system doesn\u2019t simply select the highest bidder; it selects the ad with the highest total value score, which includes the bid, predicted action rate, and ad quality, meaning a moderately priced but highly relevant ad can win over a higher bid.\u00a0([turn0search12][turn0search23])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How does machine learning play a role in the Facebook Ads algorithm?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"The algorithm uses machine learning models to analyse user behaviour and context to predict how likely a user is to take the desired action on an ad, and these predictions help determine the ad\u2019s ranking and delivery.\u00a0([turn0search2][turn0search24])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What is the goal of the Facebook Ads algorithm?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"The primary goal is to deliver ads that are most relevant and likely to engage each user while balancing advertiser objectives and user experience, showing content that aligns with interests rather than just the highest bids.\u00a0([turn0search1][turn0search8])\"\n      }\n    }\n  ]\n}\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Have you ever seen an ad on your Facebook or Instagram feed that relates to your passion, sporting activity or interests? It\u2019s perfectly normal. Meta (the parent company of Facebook and Instagram) offers today\u2019s most personalized advertising experience.<\/p>\n","protected":false},"author":50,"featured_media":180364,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"editor_notices":[],"footnotes":""},"categories":[2433],"class_list":["post-180357","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-ai"],"acf":[],"_links":{"self":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/180357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/comments?post=180357"}],"version-history":[{"count":4,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/180357\/revisions"}],"predecessor-version":[{"id":206605,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/180357\/revisions\/206605"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media\/180364"}],"wp:attachment":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media?parent=180357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/categories?post=180357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}