Skip to content
ReinoAds

IntegrationIntegration Preview

SDK Integration

Illustrative SDK installation, initialization and first ad display for web, Android and iOS.

Preview

The package names @reinoads/web-sdk, com.reinoads:sdk and the ReinoAds Swift package are illustrative. Distribution channels and versions are shared after account approval.

The SDKs build the decision request, load the creative, report impression and click events, and attach consent information to every request on your behalf. SDKs are always initialized with a publishable key.

Installation

npm install @reinoads/web-sdk

Initialization

import { ReinoAds } from "@reinoads/web-sdk";

export const reinoAds = new ReinoAds({
  publishableKey: "pk_live_...",
  environment: "live",
  consent: {
    kvkk: true,
    personalized_ads: false
  }
});

Showing a rewarded video

lifecycleScope.launch {
    val decision = ReinoAds.requestAd(
        placement = "rewarded",
        audience = "premium-fans",
        policy = "brand-safe"
    )

    when (decision.outcome) {
        Outcome.SERVED -> decision.show(activity) { reward ->
            grantReward(reward.type, reward.amount)
        }
        Outcome.HOUSE_AD -> decision.show(activity)
        else -> hideAdSlot()
    }
}

Verify rewards on your server

Never grant a reward based solely on the client callback. Confirm it on your server using the decision.rewarded webhook or a server-side decision lookup.