store icon indicating copy to clipboard operation
store copied to clipboard

feat: wrap the store around AdsProvider

Open Copilot opened this issue 2 months ago • 3 comments

What problem is this solving?

Integrates VTEX Ads into Store Framework via AdsProvider wrapper. Part of the Ads Frictionless Integration RFC.

Key change: ads are now hydrated client-side, enabling CDN cache hits for product data (previously uncacheable due to real-time auction responses).

Changes:

  • VTEXAdsProvider: wraps store content, provides ad context using publisherId from store settings
  • Fetches user session data client-side for ad targeting
  • Uses @vtex/ads-react SDK to request and merge ads with product data
  • Adds publisherId setting to manifest schema (replaces fetchSponsoredProductsOnSearch)

How to test it?

Workspace

Search for "camisa" to see sponsored products from an active campaign.

Screenshots or example usage:

Sponsored products displaying with "Patrocinado" badge:

Sponsored products in search results

Describe alternatives you've considered, if any.

N/A

Related to / Depends on

  • https://github.com/vtex-apps/product-summary/pull/411
  • https://github.com/vtex-apps/search-result/pull/711

How does this PR make you feel? :link:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot avatar Dec 03 '25 17:12 Copilot