Quick answer
- Keep your current network. Call CleanAds only when it has no ad for a request.
- Users never see two ads in a row: the fallback runs only if the first ad never appeared.
- No exclusivity, 70% revenue share, payouts in TON or USDT.
Why a fallback earns more
Every ad network has its own advertisers, and their budgets are spread unevenly across countries, formats and hours. When none of them wants a particular request, the network returns no ad and that moment in your app earns nothing. A second network with different advertisers fills part of those gaps. You keep all the revenue your primary network already makes and add whatever the fallback fills.
This matters most for rewarded ads. A user who taps “Watch an ad for coins” and gets nothing is disappointed, and may not tap again.
Option 1: AdsGram first, CleanAds as fallback
The safest way to start. AdsGram's show() resolves when an ad was watched and rejects when something went wrong. The rejection carries the ad's state. If it never got past load, no ad reached the screen, so it is safe to try CleanAds.
<script src="https://sad.adsgram.ai/js/sad.min.js"></script>
<script src="https://api.cleanads.ai/sdk/v1.js"></script>
<script>
const adsgram = window.Adsgram.init({ blockId: "YOUR_ADSGRAM_BLOCK_ID" });
const cleanads = CleanAds.init({ placementId: "pl_xxx", userId: currentUser.id });
async function showRewarded() {
try {
await adsgram.show(); // watched: grant the reward
return grantReward();
} catch (result) {
// Fall back only if AdsGram never got an ad on screen, so a user is never shown two ads in a row.
if (result && result.state && result.state !== "load") return continueGame();
}
try {
await cleanads.show();
grantReward();
} catch (e) {
continueGame(); // no ad anywhere, or closed early
}
}
</script>Option 2: CleanAds first, another network as fallback
CleanAds rejects with a precise reason, so the fallback can tell “no ad” (no_fill, network_error, …) apart from “the user closed the ad early” (closed_early).
import { init } from "@cleanads/sdk";
const cleanads = init({ placementId: "pl_xxx", userId: currentUser.id });
const adsgram = window.Adsgram.init({ blockId: "YOUR_ADSGRAM_BLOCK_ID" });
export async function showRewarded(): Promise<boolean> {
try {
await cleanads.show();
return true; // grant the reward
} catch (e: any) {
// The user saw a CleanAds ad and closed it early: don't show another one.
if (e?.reason === "closed_early" || e?.reason === "already_showing") return false;
}
try {
await adsgram.show();
return true;
} catch {
return false;
}
}How to tell which order is better
- Run one order for at least a week so weekday and weekend traffic are both included.
- For each network, divide revenue by the number of ad requests you sent it, then multiply by 1,000.
- Put the network with the higher revenue per 1,000 requests first. Check again every month; demand changes.
Grant rewards once
With two networks, the safest way to grant valuable rewards is from your server. CleanAds calls your signed reward callback once per completed view. Make sure your client code grants a reward at most once per button tap, whichever network showed the ad.
Start in a few minutes
- Create a free publisher account and add your Mini App.
- Create a rewarded placement and copy its id (
pl_…). - Paste one of the snippets above. New apps receive test ads right away, so you can check the flow before review.