Skip to main content
Topsort’s banner.js public library allows marketplaces display banner ads through a low-code integration. By using a simple HTML tag, the marketplace can connect to Topsort’s ad server and render banners from active campaigns without complex integrations.

Installation

You can install the library using npm or yarn, or load the SDK directly in your HTML file by including a <script> tag:

Usage

This example shows a minimal setup required to do it. The integration works with standard HTML and Javascript, making it compatible with most frontend stacks. To test it, you just need to add your Marketplace API Key and the banner slot id, configured in the campaign.
These are the attributes available for the <topsort-banner> component. They serve as input to the auction request, to fetch the right winners for that context. These are the attributes available for the <topsort-banner> component. They serve as input to the auction request, to fetch the right winners for that context. The banner interface is the structure of a banner object. Each banner contains metadata about the campaign, and the resolvedBidId, the parameter needed for tracking user interactions (clicks and impressions).