Skip to main content

Web

Repository: [https://github.com/borellion/sdk)

note

You will first need to create an ad unit on the marketplace in order to get started. Check out For Creators for more instructions.

Step 1a - Installing from CDN

You can install from our CDN by adding this script tag into your page's <head>:

<script src="https://cdn.borellion.com/sdk/borellion-web-sdk.js"></script>

Step 1b - Installing from NPM

Install the SDK from NPM like so:

npm install '@borellion/web-sdk'

Step 2 - Bringing the Borellion Banner into your page

Add the <borellion-ad> web component anywhere in your HTML:

<borellion-ad
ad-unit="YOUR_AD_UNIT_ID"
format="medium-rectangle"
width="300px">
</borellion-ad>

Replace YOUR_AD_UNIT_ID with your own ad unit ID.

Step 3 - Customizing your banner display

These are the available attributes for your banner:

info

ad-unit required

String: The ID of your ad unit.

ad-unit="YOUR_AD_UNIT_ID"

format required

Determines the aspect ratio of your ad unit. Valid options are billboard, medium-rectangle, or mobile-phone-interstitial.

  • Billboard - 970 x 250
  • Medium Rectangle - 300 x 250
  • Mobile Phone Interstitial - 750 x 1334

format="medium-rectangle"

width optional

The CSS width of the banner element (e.g. 300px, 100%). Defaults to the natural width of the format.

width="300px"

Step 4 - Testing Locally

To test your integration locally with sample ads, add the ?debug=true flag to your URL (e.g., http://localhost:3000/?debug=true). This will load sample ads for testing purposes. Real ads will load when you deploy to production.

Source Reference

<borellion-ad
ad-unit="YOUR_AD_UNIT_ID"
format="YOUR_AD_UNIT_FORMAT"
width="300px">
</borellion-ad>