Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add showSponsored as api configuration on faststore.config.js to IntelligentSearch integration #2438

Merged
merged 8 commits into from
Oct 1, 2024

Conversation

fltiago
Copy link
Contributor

@fltiago fltiago commented Sep 5, 2024

What's the purpose of this pull request?

This PR adds support for showing sponsored products when using Intelligent Search. FastShop and probably more retailers are interested in our ad solution (VTEX Ad Network). This PR intends to create a frictionless integration between FastStore and VTEX Ad Network.

How it works?

The store will change the showSponsored configuration on the faststore.config.js file to allow intelligent search to return sponsored products. This will only happen if the store is a active publisher on VTEX Ad Network.

On faststore.config.js

 // Platform specific configs for API
  api: {
    ...
    showSponsored: true,
  }

How to test it?

  • Change the showSponsored attribute to true on faststore.config.js
  • Verify if the store is an active publisher on VTEX Ad Network
  • Create a campaign to be delivered to the store with a valid product

Check the starter page with the showSponsored flag to true and no label: Starter With Ads - related PR:

Example with no label:
image

Perfomance for category page:
image
image

Performance for full text search page:
image
image

Starters Deploy Preview

References

Copy link

vercel bot commented Sep 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 7:36pm

Copy link

codesandbox-ci bot commented Sep 5, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pedromtec
Copy link
Contributor

Hey @fltiago, did you test in our starter?

@fltiago fltiago marked this pull request as ready for review September 18, 2024 14:33
@fltiago fltiago requested a review from a team as a code owner September 18, 2024 14:33
@fltiago fltiago requested review from hellofanny and renatamottam and removed request for a team September 18, 2024 14:33
@fltiago fltiago marked this pull request as draft September 18, 2024 14:41
@fltiago fltiago marked this pull request as ready for review September 20, 2024 12:09
@@ -1560,6 +1578,7 @@ export type ClientSearchSuggestionsQueryQuery = {
value: any
valueReference: any
}>
advertisement: { adId: string; adResponseId: string } | null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Was this line updated manually?

Copy link
Contributor Author

@fltiago fltiago Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. This line is based on this fragment here.

@pedromtec
Copy link
Contributor

@fltiago What is the performance of the full text search page in the Starter?

@fltiago
Copy link
Contributor Author

fltiago commented Sep 23, 2024

@fltiago What is the performance of the full text search page in the Starter?

I added in the PR description or did you mean on the original starter page?

image
image

Copy link
Member

@eduardoformiga eduardoformiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Question: is it normal to repeat the sponsored product?
Screenshot 2024-09-26 at 12 45 15

"""
Advertisement information about the product.
"""
advertisement: Advertisement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In FastStore, we follow schema.org to define new props, and schema.org does not have an advertisement prop for Product that fits better for advertisement (maybe additionalProperty ?). In this case, I think we can proceed with the advertisement prop and propose this new field to schema.org somehow. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know we used a well-defined partner for our schemas, seems awesome.

I agree and I will study schema.org to see how advertisement will fit, but first I think we should test and see how it goes.

@fltiago
Copy link
Contributor Author

fltiago commented Sep 26, 2024

LGTM! Question: is it normal to repeat the sponsored product? Screenshot 2024-09-26 at 12 45 15

Yes, it is! The advertisers pay for that, to have more space and be in a better position.

@pedromtec pedromtec merged commit cc3cc88 into main Oct 1, 2024
7 checks passed
@pedromtec pedromtec deleted the feat/add-ads-integration-to-faststore branch October 1, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributing Pull request submitted by the community enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants