<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anita Kapal</title>
    <description>The latest articles on DEV Community by Anita Kapal (@anita_kapal_48632cd18fdb2).</description>
    <link>https://dev.to/anita_kapal_48632cd18fdb2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4004405%2Ff6a88731-ae61-4d44-a2ac-26587f9849ea.jpeg</url>
      <title>DEV Community: Anita Kapal</title>
      <link>https://dev.to/anita_kapal_48632cd18fdb2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anita_kapal_48632cd18fdb2"/>
    <language>en</language>
    <item>
      <title>How Blinkit, Zepto, and Instamart Turn Product Search Into Ad Revenue</title>
      <dc:creator>Anita Kapal</dc:creator>
      <pubDate>Sun, 28 Jun 2026 12:03:14 +0000</pubDate>
      <link>https://dev.to/anita_kapal_48632cd18fdb2/how-blinkit-zepto-and-instamart-turn-product-search-into-ad-revenue-52p</link>
      <guid>https://dev.to/anita_kapal_48632cd18fdb2/how-blinkit-zepto-and-instamart-turn-product-search-into-ad-revenue-52p</guid>
      <description>&lt;h1&gt;
  
  
  How Quick Commerce Apps Become Advertising Platforms: A System Design Perspective
&lt;/h1&gt;

&lt;p&gt;When we think about quick commerce apps, the first thing that comes to mind is speed.&lt;/p&gt;

&lt;p&gt;10-minute delivery.&lt;br&gt;
Dark stores.&lt;br&gt;
Riders.&lt;br&gt;
Inventory.&lt;br&gt;
Real-time availability.&lt;br&gt;
Fast checkout.&lt;/p&gt;

&lt;p&gt;From the outside, quick commerce looks like a logistics problem.&lt;br&gt;
But if we look at it from a developer and system design perspective, there is another interesting layer.&lt;br&gt;
Quick commerce is not only about delivering products quickly.&lt;br&gt;
It is also about deciding &lt;strong&gt;which products should be shown to the user first&lt;/strong&gt;.&lt;br&gt;
And that decision is where advertising enters the system.&lt;/p&gt;
&lt;h2&gt;
  
  
  My Observation as a Regular User
&lt;/h2&gt;

&lt;p&gt;I frequently use apps like &lt;strong&gt;Instamart&lt;/strong&gt; and &lt;strong&gt;Zepto&lt;/strong&gt; for ordering groceries, snacks, and daily-use items.&lt;/p&gt;

&lt;p&gt;Earlier, I used to think these apps were mostly about convenience. Open the app, search for what I need, add items to cart, pay, and get them delivered quickly.&lt;/p&gt;

&lt;p&gt;But last month, I started noticing something interesting.&lt;/p&gt;

&lt;p&gt;After I added products to my cart and moved toward checkout, the app started showing me suggestions to &lt;strong&gt;swap&lt;/strong&gt; the product I had selected with another product.&lt;/p&gt;

&lt;p&gt;For example, if I added one masala packet to my cart, the checkout page showed another similar product with a message like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Swap for better value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flmchqoemnj9vo983mgy3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flmchqoemnj9vo983mgy3.jpeg" alt=" " width="540" height="1320"&gt;&lt;/a&gt;&lt;br&gt;
The suggested product was bigger or cheaper, and the app encouraged me to replace the item already in my cart.&lt;br&gt;
At first, this looked like a simple value-saving feature.&lt;br&gt;
But from a developer perspective, this is much more than a small UI suggestion.&lt;/p&gt;

&lt;p&gt;This is a real-time recommendation and monetization system working inside the checkout flow.&lt;br&gt;
The user has already shown buying intent.&lt;br&gt;
The user has already added an item to the cart.&lt;/p&gt;

&lt;p&gt;Now the system has one more chance to influence the final purchase decision.&lt;/p&gt;

&lt;p&gt;That is a very powerful moment.&lt;/p&gt;
&lt;h2&gt;
  
  
  Ads Are Moving Closer to Checkout
&lt;/h2&gt;

&lt;p&gt;Another thing I noticed on Zepto is that the homepage is no longer only a product discovery page.&lt;/p&gt;

&lt;p&gt;When I open the app, I now see a small video ad window on the bottom-left side of the screen.&lt;br&gt;
It looks like a floating video ad, similar to what we see in social media apps or content platforms.&lt;br&gt;
This is interesting because quick commerce apps are slowly adding more ad surfaces.&lt;/p&gt;

&lt;p&gt;Earlier, ads were mostly banners or sponsored products.&lt;/p&gt;

&lt;p&gt;Now we see:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp2dy81wa3w9w3u2qqnrk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp2dy81wa3w9w3u2qqnrk.jpeg" alt=" " width="540" height="1320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means quick commerce apps are not only becoming shopping platforms.&lt;/p&gt;

&lt;p&gt;They are becoming &lt;strong&gt;attention platforms&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The user opens the app to buy groceries or snacks, but the app also gets an opportunity to show brand promotions at different points in the journey.&lt;/p&gt;
&lt;h2&gt;
  
  
  The User Thinks It Is a Shopping App
&lt;/h2&gt;

&lt;p&gt;Let’s say a user opens a quick commerce app and searches for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chips
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The user expects a simple list of chips.&lt;br&gt;
But from the system side, this is not just a search query.&lt;br&gt;
It becomes a ranking problem.&lt;/p&gt;

&lt;p&gt;The system needs to decide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Which products match the query?
Which products are available near the user?
Which products can be delivered quickly?
Which products have better margins?
Which products are popular in that location?
Which products are sponsored by brands?
Which products should appear at the top?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the final product list is not random.&lt;br&gt;
It is the output of multiple systems working together.&lt;/p&gt;
&lt;h2&gt;
  
  
  Quick Commerce Search Is Not Just Search
&lt;/h2&gt;

&lt;p&gt;In a normal search engine, the goal is relevance.&lt;br&gt;
But in quick commerce, search ranking has more signals.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;final_score =
    relevance_score
  + availability_score
  + location_score
  + popularity_score
  + personalization_score
  + sponsored_score
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a simplified version, but it shows the idea.&lt;br&gt;
A product may rank higher because it is relevant.&lt;br&gt;
Another product may rank higher because it is available in the nearest dark store.&lt;br&gt;
Another product may appear higher because the brand paid for sponsored placement.&lt;br&gt;
This is how a shopping app slowly becomes an advertising platform.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Digital Shelf
&lt;/h2&gt;

&lt;p&gt;In offline supermarkets, brands pay for better shelf placement.&lt;br&gt;
Products kept at eye level are more visible.&lt;br&gt;
Products near the billing counter get more purchases.&lt;br&gt;
Quick commerce has a digital version of this.&lt;/p&gt;

&lt;p&gt;The homepage is a digital shelf.&lt;br&gt;
Search results are a digital shelf.&lt;br&gt;
Recommendation widgets are digital shelves.&lt;br&gt;
The cart page is also becoming a digital shelf.&lt;br&gt;
Even the checkout page is becoming a digital shelf.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Home Page
 ├── Banner Ads
 ├── Floating Video Ads
 ├── Recommended Products
 ├── Sponsored Products
 ├── Category Promotions
 └── Offers Near You

Cart Page
 ├── Swap for Better Value
 ├── Frequently Bought Together
 ├── Add More Items
 ├── Unlock Free Delivery
 └── Sponsored Suggestions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every section can become ad inventory.&lt;br&gt;
That means the platform can monetize not only on orders, but also the attention of the user.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Cart Recommendations Are So Powerful
&lt;/h2&gt;

&lt;p&gt;The cart page is one of the most powerful places to influence a user.&lt;/p&gt;

&lt;p&gt;Why?&lt;br&gt;
Because the user is already very close to buying.&lt;br&gt;
They are not casually browsing anymore.&lt;br&gt;
They have selected products.&lt;br&gt;
They are checking the final amount.&lt;br&gt;
They are almost ready to pay.&lt;/p&gt;

&lt;p&gt;So when the app shows a product replacement or upgrade at this stage, the probability of conversion can be high.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User added:
Aachi Masala Garam, 50g

App suggests:
Another garam masala product, 100g, at a lower effective price
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the user side, this looks like a helpful suggestion.&lt;/p&gt;

&lt;p&gt;From the system side, this may involve:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Product similarity
Price comparison
Margin optimization
Inventory availability
Brand promotion
Sponsored ranking
Conversion prediction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The app is not just asking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What did the user add?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is also asking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Can we suggest something better?
Can we increase order value?
Can we promote a specific brand?
Can we improve margins?
Can we unlock a discount threshold?
Can we make the user add or swap one more item?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is where product design, recommendation systems, and advertising logic come together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Is Powerful for Brands
&lt;/h2&gt;

&lt;p&gt;The most important thing about quick commerce is purchase intent.&lt;br&gt;
When someone opens a quick commerce app, they are usually ready to buy.&lt;br&gt;
They are not casually browsing like on social media.&lt;br&gt;
They may want toothpaste, milk, snacks, cold drinks, instant noodles, butter, or masala right now.&lt;br&gt;
This makes ads very valuable.&lt;br&gt;
A sponsored product shown inside a quick commerce app is shown very close to the buying decision.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User searches: "cold drink"

Organic result:
- Coca-Cola
- Pepsi
- Sprite

Sponsored result:
- New energy drink brand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the sponsored product appears at the right position, with the right price and availability, the user may buy it immediately.&lt;br&gt;
That is why quick commerce ads can be powerful.&lt;br&gt;
They are not just display ads.&lt;br&gt;
They are ads connected to real-time buying intent.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Developers See Behind This
&lt;/h2&gt;

&lt;p&gt;As users, we only see a card, a banner, a video ad, or a swap suggestion.&lt;/p&gt;

&lt;p&gt;But developers think about the systems behind it.&lt;/p&gt;

&lt;p&gt;For example, when I see a “swap for better value” card in the cart, I think about the backend logic that may be running behind it.&lt;/p&gt;

&lt;p&gt;Something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User adds product to cart
   ↓
Cart service updates cart
   ↓
Recommendation service checks similar products
   ↓
Inventory service checks availability
   ↓
Pricing service compares discounts
   ↓
Ad service checks sponsored campaigns
   ↓
Ranking service selects best replacement
   ↓
UI shows swap suggestion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The user only sees one simple suggestion.&lt;br&gt;
But behind that suggestion, multiple services may be working together in real time.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Systems Are Needed Behind This?
&lt;/h2&gt;

&lt;p&gt;From a developer perspective, this business model needs many backend systems.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Search System
&lt;/h3&gt;

&lt;p&gt;The search system handles user queries.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query: "bread"
Location: Bangalore
Dark Store: DS_102
User ID: 84721
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system needs to return products that are relevant and available.&lt;br&gt;
It cannot show items that are out of stock.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Inventory System
&lt;/h3&gt;

&lt;p&gt;Inventory is very important in quick commerce.&lt;/p&gt;

&lt;p&gt;If an ad promotes a product that is unavailable, the user experience becomes bad.&lt;br&gt;
So the ad system must talk to the inventory system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if product.available_in_dark_store == true:
    show_product()
else:
    hide_product()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sounds simple, but at scale it becomes difficult because inventory changes constantly.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Ad Serving System
&lt;/h3&gt;

&lt;p&gt;The ad serving system decides which sponsored product, banner, or video ad to show.&lt;br&gt;
It may consider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Brand campaign budget
Target city
Target category
User segment
Time of day
Product availability
Bid amount
Expected conversion rate
Placement type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ad Campaign:
  brand: Snack Brand A
  category: Chips
  city: Mumbai
  budget: ₹5,00,000
  bid_per_click: ₹8
  target_keyword: "chips"
  placement: search_results
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a user searches for “chips” in Mumbai, this campaign becomes eligible.&lt;/p&gt;

&lt;p&gt;Similarly, for a homepage video ad, the system may check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Is the user in the target city?
Is the campaign active?
Has the user already seen this ad?
Is the brand targeting this category?
Is the video creative approved?
What is the frequency cap?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the app decides whether to show that small floating video window.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Ranking System
&lt;/h3&gt;

&lt;p&gt;The ranking system combines organic and sponsored results.&lt;br&gt;
This is where the business logic becomes interesting.&lt;br&gt;
The platform cannot simply show the highest-paying ad everywhere.&lt;br&gt;
If the ad is irrelevant, users may lose trust.&lt;br&gt;
So the ranking system needs balance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ranking_score =
    relevance * 0.4
  + availability * 0.2
  + personalization * 0.2
  + ad_score * 0.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The actual system would be much more complex, but the basic idea is the same.&lt;br&gt;
The platform has to optimize for revenue without affecting user experience.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Cart Recommendation System
&lt;/h3&gt;

&lt;p&gt;This is the system behind swap suggestions and add-on recommendations.&lt;br&gt;
It may use rules like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If user added product A,
find products from the same category.

Filter products by:
- availability
- price advantage
- higher quantity
- active offers
- better margin
- sponsored campaign eligibility

Rank products and show the best swap option.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A simplified version may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cart_swap_score =
    similarity_score
  + price_value_score
  + availability_score
  + margin_score
  + sponsored_score
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is why the cart page is not passive anymore.&lt;br&gt;
It is becoming an active recommendation surface.&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Recommendation System
&lt;/h3&gt;

&lt;p&gt;Quick commerce apps also use recommendation systems.&lt;/p&gt;

&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Users who bought milk also bought bread.
Users who bought pasta also bought pasta sauce.
Users who bought chips also bought cold drinks.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These recommendations can also include sponsored products.&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Frequently bought together:
- Nachos
- Salsa dip
- Sponsored soft drink
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates another place where ads can be inserted naturally.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Analytics Pipeline
&lt;/h3&gt;

&lt;p&gt;Brands do not only want ad impressions.&lt;br&gt;
They want performance data.&lt;/p&gt;

&lt;p&gt;They want to know:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;How many users saw the ad?
How many clicked?
How many added the product to cart?
How many swapped?
How many purchased?
Which city performed best?
Which keyword converted best?
What was the return on ad spend?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the platform needs an analytics pipeline.&lt;/p&gt;

&lt;p&gt;A simplified event flow may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User opens app
   ↓
Homepage viewed
   ↓
Video ad impression logged
   ↓
Search event generated
   ↓
Sponsored product impression logged
   ↓
Product click logged
   ↓
Add to cart logged
   ↓
Swap suggestion shown
   ↓
Swap accepted or ignored
   ↓
Purchase completed
   ↓
Dashboard updated for brand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is why event tracking is very important.&lt;br&gt;
Without tracking, the platform cannot prove that ads are working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;Quick commerce may look like a delivery business on the surface.&lt;/p&gt;

&lt;p&gt;But from a system design perspective, it is also a real-time search, ranking, recommendation, inventory, cart optimization, and advertising platform.&lt;/p&gt;

&lt;p&gt;The user opens the app to buy something quickly.&lt;br&gt;
The brand wants visibility at that exact moment.&lt;br&gt;
The platform sits in the middle and controls what the user sees.&lt;/p&gt;

&lt;p&gt;That attention is valuable.&lt;/p&gt;

&lt;p&gt;And monetizing that attention through ads is one of the most interesting parts of the quick commerce business model.&lt;/p&gt;

&lt;p&gt;So the next time you open Instamart or Zepto and see a swap suggestion in the cart, a sponsored product, or a small floating video ad on the homepage, remember:&lt;/p&gt;

&lt;p&gt;Behind that small UI element, there may be an entire ad-serving and recommendation system running in real time.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>An Interviewer Asked Me How Amazon Recommends Products Without Login</title>
      <dc:creator>Anita Kapal</dc:creator>
      <pubDate>Sat, 27 Jun 2026 08:04:59 +0000</pubDate>
      <link>https://dev.to/anita_kapal_48632cd18fdb2/an-interviewer-asked-me-how-amazon-recommends-products-without-login-3j8c</link>
      <guid>https://dev.to/anita_kapal_48632cd18fdb2/an-interviewer-asked-me-how-amazon-recommends-products-without-login-3j8c</guid>
      <description>&lt;p&gt;Recently in an interview I was asked one interesting question: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How does a platform like Amazon recommend products to user when user is not logged in?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I answered something like:&lt;br&gt;
&lt;code&gt;Amazon can use cookies to identify user and also when users search for products Amazon saves that information in key-value format like this product is searched by many users and recommends based on that&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After the interview, I kept thinking about it my answer was not completely wrong but I felt that the interviewer was expecting something more. So I searched for it and learned more about it. This is how I will answer the same question now.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Original Answer
&lt;/h2&gt;

&lt;p&gt;Even if the user is not logged in, Amazon can store an anonymous user in this browser using cookies or local storage.&lt;br&gt;
For example:&lt;br&gt;
anonymous_user_abc123 searched "wireless mouse" anonymous_user_abc123 viewed "Logitech&lt;/p&gt;

&lt;p&gt;yes cookies or session IDs are part of the answer, but the more important question is:&lt;br&gt;
&lt;strong&gt;After identifying an anonymous session, how amazon decide what to recommend?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Missed
&lt;/h2&gt;

&lt;p&gt;A better answer should include these parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Anonymous user tracking&lt;/li&gt;
&lt;li&gt;Session-based behaviour&lt;/li&gt;
&lt;li&gt;Item-to-item recommendations&lt;/li&gt;
&lt;li&gt;Merging anonymous activity after user login&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let me explain each one&lt;br&gt;
&lt;strong&gt;1. Anonymous User Tracking&lt;/strong&gt;&lt;br&gt;
Even without login Amazon can create a temporary anonymous profile based on:&lt;br&gt;
cookie ID&lt;br&gt;
session ID&lt;br&gt;
device/browser information&lt;br&gt;
IP-level location&lt;br&gt;
current browsing history&lt;/p&gt;

&lt;p&gt;For example if i open Amazon and search for "running shoes" then click on some few products like Nike and Adidas shoes, Amazon can understand this anonymous user session is interested in running shoes related products.&lt;br&gt;
So the system will build a short-term profile like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;anonymous_user_abc123: &lt;br&gt;
interested_categories: shoes, fitness searched_terms: running shoes viewed_products: Nike shoes, Adidas shoes possible_intent: buying sports shoes&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This profile is temporary, but it is still useful&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Session-Based Recommendations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a user who is not logged in, Amazon will be depend on the current session. That means latest user actions become very important.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
User searches: "iPhone 15 case"&lt;br&gt;
User views: transparent iPhone case&lt;/p&gt;

&lt;p&gt;Now Amazon can recommend products:&lt;br&gt;
MagSafe charger&lt;br&gt;
screen protector&lt;br&gt;
phone stand&lt;/p&gt;

&lt;p&gt;This is called session based recommendation system does not know the user but based on what this session is doing right now, these products are more relevent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Item-to-Item Recomendations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is probably the most important thing I missed in my interview answer. Amazon does not always need a full user profile to recommend products. Sometimes, the current product itself is enough.&lt;/p&gt;

&lt;p&gt;For example, if a user is viewing an iPhone, Amazon can recommend:&lt;br&gt;
iPhone case&lt;br&gt;
screen protector&lt;br&gt;
charger&lt;/p&gt;

&lt;p&gt;Why?&lt;br&gt;
Because many users who viewed or bought an iPhone also bought these related products. This is understood as item-to-item collaborative filtering. Instead of asking "What does this user like?" System asks, " What products are related to the product this user is currently viewing?"&lt;br&gt;
So even if the user is anonymous, Amazon can still recommend products based on product relationships.&lt;/p&gt;

&lt;p&gt;This is where my original answer was weak.&lt;br&gt;
I said this product has been searched by many users. But a better answer to say is: Amazon can use aggregate behavior from many users to build relationships between products, such as "frequently bought together," "customers also viewed," and "similar products."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. What Happens After Login?&lt;/strong&gt;&lt;br&gt;
One good point to mention in an interview is profile merging.&lt;br&gt;
Later, when the user logs in, Now Amazon may connect that anonymous session activity with the logged-in account. So the temporary anonymous behavior can become part of the user’s long-term recommendation profile.&lt;br&gt;
This is useful because the system does not lose the user’s intent just because they started browsing before login&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Learning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The main thing I learned from this interview question is that in system design or backend interviews, we should not stop at one keyword.&lt;/p&gt;

&lt;p&gt;Saying "cookies" was not wrong, but it was incomplete.&lt;/p&gt;

&lt;p&gt;A better answer connects multiple parts:&lt;br&gt;
anonymous identification&lt;br&gt;
event tracking&lt;br&gt;
session behavior&lt;br&gt;
item similarity&lt;br&gt;
profile merging&lt;/p&gt;

&lt;p&gt;This question also taught me that recommendation systems do not always need a logged-in user.&lt;br&gt;
A lot can be done using the current session and aggregate behavior from other users.&lt;/p&gt;

&lt;p&gt;So next time, instead of answering only from the storage perspective, I will answer from the complete system perspective.&lt;br&gt;
And that is the difference between a partially correct answer and a strong interview answer.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>career</category>
      <category>systemdesign</category>
      <category>interview</category>
    </item>
  </channel>
</rss>
