Overview
Integrate Adrop Web SDK into your React project to display banner ads and native ads.Supported Ad Formats
- Banner Ads
- Native Ads (with custom UI support)
Requirements
- React 16.8 or higher
- Node.js 14 or higher
Installation
Install the SDK using NPM or Yarn.Initialization
Initialize the SDK at your app’s entry point (main.tsx or index.tsx). The SDK works as a singleton, so you only need to initialize it once.
main.tsx
Initialization Options (AdropConfig)
App ID issued from Ad Control Console
User identifier (used for targeting)
API authentication key (required for updating user properties)
Enable debug logging
Instance Access
After initialization, you can access the SDK from anywhere usingAdrop.instance().
Dynamic Configuration Updates
You can change settings at runtime, such as setting a user ID after login.For targeted ads to work properly, set
uid before entering the ad placement.WebView Setup (For Backfill Ads)
If your web app runs in a WebView and you want to display backfill ads, you need to configure the native app. See the platform-specific guides below.Android Setup
Android WebView setup guide
iOS Setup
iOS WebView setup guide
Table of Contents
Banner Ads
Implement banner ads
Native Ads
Implement native ads
Targeting
Audience/Contextual targeting
Reference
Classes, interfaces, constants
Examples
React, CDN example code