Documentation
Feedback
Guides
Storefront Development

Storefront Development
FastStore

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

  1. Open your FastStore project in a code editor and go to discovery.config.js file.
  2. In the discovery.config.js file, add the following configuration for api:

_10
api: {
_10
...
_10
showSponsored: true,
_10
},

The showSponsored configuration in the store's settings enables the Intelligent Search to return sponsored products.
  1. Open your terminal and run the yarn dev command to apply the configuration.
  2. Access your store locally by using the URL shown in the terminal (usually http://localhost:3000/).
  3. 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.
    {"base64":"  ","img":{"width":1252,"height":845,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":513563,"url":"https://vtexhelp.vtexassets.com/assets/docs/src/faststore-ad-network___fc69fdbd20990eefb318ddbca16d4cd0.png"}}
Sponsored products may appear more than once, depending on advertiser settings.
  1. To apply your configuration to the production store, create a new branch and commit your changes.
  2. Open a pull request for the branch in your store's GitHub repository.
  3. Review and merge the pull request into the main branch.
Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page