Skip to main content

Overview

You can integrate Adrop Web SDK via CDN script without build tools. Suitable for static websites or simple HTML pages.

Supported Ad Formats

  • Banner Ads
  • Native Ads (with custom UI support)

Requirements

  • Modern browsers (Chrome, Firefox, Safari, Edge)

Installation

Add the script to the <head> section of your HTML document.
<script src="https://cdn.jsdelivr.net/npm/@adrop/ads-web-sdk@latest/dist/adrop-ads.min.js"></script>
To lock to a specific version, specify the version number instead of @latest. Example: @adrop/ads-web-sdk@1.0.1

Initialization

Initialize the SDK after the script loads.
<script>
  const adrop = Adrop.observe({
    appId: 'YOUR_APP_ID',
    debug: true  // true only in development
  });
</script>

Initialization Options (AdropConfig)

appId
string
required
App ID issued from Ad Control Console
uid
string
User identifier (used for targeting)
appKey
string
API authentication key (required for updating user properties)
debug
boolean
default:false
Enable debug logging
Set debug: false in production environments.

Instance Access

After initialization, you can access the SDK from anywhere using Adrop.instance().
const adrop = Adrop.instance();
// Use SDK

Dynamic Configuration Updates

You can change settings at runtime, such as setting a user ID after login.
// Using setConfig
Adrop.instance().setConfig({
  uid: 'USER_ID',
  appKey: 'YOUR_APP_KEY'
});
For targeted ads to work properly, set uid before rendering the ad placement.

Table of Contents