adv2.1
ad module
Interstitial & rewarded video ads with attribution.
Available Methods
sdk.ad.loadRewarded()
sdk.ad.show()
sdk.ad.onReward()
Example Usage
import { usePoremi } from '@poremi/react-sdk';
function AdButton() {
const { sdk } = usePoremi();
const handleShow = async () => {
const placement = await sdk.ad.loadRewarded({ unitId: 'your-unit-id' });
const result = await placement.show();
if (result.rewarded) console.log('Reward granted!', result.reward);
};
return <button onClick={handleShow}>Watch Ad</button>;
}
Try in Playground
🔒
Log in to open this example in the interactive playground.