How Facebook Display Ads for something you searched

Sometimes we visit some e-commerce website and check some product there and leave the website without placing order. Then when we open Facebook, we see ads of exact same or similar item from same website. Now you may wonder how Facebook got to know about product you were checking on particar website. If you are a digital marketer you might know how this works and if not, we will be uncovering this mystery in this article.

There is a Facebook technology called Pixel behind all this. Pixel is just a piece of javascript code which is unique for each Facebook Ads account. This javascript code is placed in header section of each page of website.

Please see https://www.facebook.com/business/help/952192354843755 for details.

This code tracks user activities and events on page and send back following information to the Facebook –

  • Which page customer visits
  • What product customer views
  • What products customer adds to their cart
  • What products are actually successfully ordered
  • Standard and Custom events specific to website etc.

It also sends few other informations like –



  • Browser information
  • IP address
  • Machine information etc.

So whenever a customer who has logged in to his/her Facebook account visits website using same browser then this customer is tagged as custom audience of this website and his/her activity data is tracked and sent back to the Facebook.

If the user is not logged in to his/her Facebook account and visits the website, then a browser based cookie is placed with necessary activity record in the browser and later on when customer logs in to Facebook using same browser, then it got tagged as custom audience.

Once the customer is tagged, he/she will start seeing ads on his/her Facebook profile. These ads are selected based on the data recieved from the website. This is called Retargetting or Remarketing.

Related Articles:

This article is contributed by Atul Kumar. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.