Conversation
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
38a6fc8 to
c980df9
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces integration with the VTEX Ads SDK to request fresh, uncached ads on page load instead of relying on cached results from adserver-resolver. This change allows for displaying current sponsored products while maintaining the performance benefits of organic results caching.
- Adds
@vtex/ads-reactdependency and implements ads fetching using theuseAdshook - Creates utility functions to merge sponsored products with organic search results
- Implements loading state management to prevent UI flicker when ads are being fetched
Reviewed Changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| react/utils/adsUtils.ts | New utility function to merge sponsored products with organic search results |
| react/package.json | Adds @vtex/ads-react dependency for ads functionality |
| react/hooks/useMergeResults.ts | Custom hook managing the merging of ads and organic results with loading states |
| react/components/SearchQuery.js | Removes old advertisement options from GraphQL query |
| react/SearchResultLayout.js | Integrates ads SDK and applies merged results to layout components |
| react/SearchResultFlexible.js | Adds sponsoredCount prop threading |
| manifest.json | Version bump to beta for the new ads feature |
#### What problem is this solving? <!--- What is the motivation and context for this change? --> We're changing the encoded event parameters from `adId` to `eventParameters`, since it's not the ad ID. The data attribute is still using the data-van-aid since that's what the Activity Flow use to track events (to be changed in future). This is backwards compatible as it keeps using the `adId` as fallback to the `eventParameters` parameter. It also removes many data properties that are not being used anymore, since the `data-van-aid` is the only one considered by Activity Flow currentyl #### How to test it? <!--- Don't forget to add a link to a Workspace where this branch is linked --> In this workspace, https://leal--biggy.myvtex.com/ search for the term "camisa". #### Screenshots or example usage: <img width="1624" height="1060" alt="image" src="https://github.com/user-attachments/assets/3593a558-1ac6-4cb8-859c-93fb6fea0277" /> <!--- Add some images or gifs to showcase changes in behaviour or layout. Example: before and after images --> #### Related to / Depends on vtex-apps/store#605 vtex-apps/search-result#711 --------- Co-authored-by: Matheus Leal <matheus.leal@vtex.com> Co-authored-by: Vinícius Seixas <vinicius.seixas@vtex.com>
be2aeeb to
6d5848f
Compare
|
Your PR has been merged! App is being published. 🚀 After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:
After that your app will be updated on all accounts. For more information on the deployment process check the docs. 📖 |
This reverts commit c7742a8.
Revert "Merge pull request #711 from vtex-apps/feat/use-ads-sdk"
What problem is this solving?
This PR is part of the Ads Frictionless Integration on the Store Framework (RFC).
Use the Ads SDK to request ads instead of using the results from adserver-resolver. This allows fresh, uncached ads without compromising organic results caching.
This works by using the
useAdshook from Ads SDK to retrieve ads and injecting them onpropsofSearchResultLayout, that contains products that must be rendered.Also adds the
sponsoredCountproperty to allow easily changing it from the Site Editor.How to test it?
In this workspace, https://leal--biggy.myvtex.com/ search for the term "camisa".
Screenshots or example usage:
Sponsored products being displayed as usual when searching for product keywords of an active campaign:
Related to / Depends on
vtex-apps/store#605
vtex-apps/product-summary#411