Documentation
Feedback
Guides
API Reference

Guides
Guides

VTEX Ads JavaScript SDK

JavaScript libraries designed to integrate VTEX's advertising platform into your storefront with tools to request, fetch, and display sponsored products.

The VTEX Ads SDK is a set of JavaScript libraries designed to integrate VTEX's advertising platform into your storefront. It provides tools to request, fetch, and display sponsored products and banners with minimal effort.

The VTEX Ads SDK consists of two main packages:

  • @vtex/ads-core - Core functionality for any JavaScript environment
  • @vtex/ads-react - React-specific components and hooks

Core concepts

The SDK supports different types of advertisements:

  • Sponsored Products - Product listings with sponsored placement
  • Banners - Display advertisements (coming soon)
  • Sponsored Brands - Brand-focused advertisements (coming soon)

Placements

Placements define where ads appear in your storefront:

  • search_top_product - Top of search results
  • search_shelf_product - Product shelf in search
  • home_top - Homepage top section
  • home_shelf_product - Homepage product shelf
  • Or your custom placement, as defined on the VTEX Ads platform.

Hydration

A key concept in the VTEX Ads SDK is hydration, the process of enriching ad data with complete product information.

Raw Ads contain minimal information, such as product SKU, seller ID, and advertisement metadata.

Hydrated Ads contain complete product data, such as:

  • Product name, description, images
  • Current pricing and availability
  • Full product specifications
  • Seller information

Next steps

Contributors
1
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page