JS bundle for in-app WebViews and mobile sites. Supports banners, interstitials, and retargeting tracking.
To let the SDK see the Google Advertising ID (for dedup and attribution), pass the bridge:
// MainActivity.java
WebView webView = findViewById(R.id.web);
webView.getSettings().setJavaScriptEnabled(true);
webView.addJavascriptInterface(new Object() {
@android.webkit.JavascriptInterface
public String getAdId() {
return AdvertisingIdClient.getAdvertisingIdInfo(this).getId();
}
@android.webkit.JavascriptInterface
public String getPlatform() { return "android"; }
}, "SladuBridge");
webView.loadUrl("https://your-page-with-sladu-script.com/");
// ViewController.swift
import AdSupport
import AppTrackingTransparency
let userScript = WKUserScript(
source: """
window.SladuBridge = {
getAdId: function() { return '\(ASIdentifierManager.shared().advertisingIdentifier)'; },
getPlatform: function() { return 'ios'; }
};
""",
injectionTime: .atDocumentStart,
forMainFrameOnly: false
)
config.userContentController.addUserScript(userScript)
subid— string, zone ID from /pub/zones.
opts.target— selector for where to insert (default: create at the end of body).
opts.onClose()— callback on close.
SOONVideo inventory coming soon.opts.onReward({granted, reason}).
Sends a conversion event. Used by the retargeting pixel to replenish audiences.
Telegram: @sladu_support · email: dev@sladu.net