Integrating FastStore with VTEX Ad Network
This feature is available only for stores using the VTEX Ad Network solution. To enable it, contact Commercial Support and request the app to be installed on your VTEX account.
FastStore stores can display sponsored products through the VTEX Ad Network when using Intelligent Search. Follow the steps below to enable sponsored product display in your store.
Before you begin
Update the @faststore/cli
package
Update your store FastStore package to
v3.0.117
using @faststore/cli
. To update the package, see the Updating the@fastore/cli
package version for further details.Create a campaign
Create a campaign with valid products to be displayed to the store. To do this, follow the instructions on the Creating campaigns tutorial.
Instructions
- Open your FastStore project in a code editor and go to
discovery.config.js
file. - In the
discovery.config.js
file, add the following configuration forapi
:
_10 api: {_10 ..._10 showSponsored: true,_10 },
TheshowSponsored
configuration in the store's settings enables the Intelligent Search to return sponsored products.
-
Open your terminal and run the
yarn dev
command to apply the configuration. -
Access your store locally by using the URL shown in the terminal (usually
http://localhost:3000/
). -
On the store website, search for a product included in the VTEX Ad Network campaign. The example below shows the Fantastic Concrete Shirt as the sponsored product.
Sponsored products may appear more than once, depending on advertiser settings.
- To apply your configuration to the production store, create a new branch and commit your changes.
- Open a pull request for the branch in your store's GitHub repository.
- Review and merge the pull request into the main branch.