[{"data":1,"prerenderedAt":702},["ShallowReactive",2],{"blog-/en/blog/how-ad-mediation-works":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"author":11,"cover":12,"ogImage":12,"tags":13,"draft":6,"faq":19,"body":35,"_type":696,"_id":697,"_source":698,"_file":699,"_stem":700,"_extension":701},"/en/blog/how-ad-mediation-works","blog",false,"","How Ad Mediation Works in Telegram Mini Apps: Why One Ad Network Caps Your Revenue","Ad mediation sends each impression to several ad networks and RTB bidders instead of one. How it works in a Telegram Mini App and why one network caps revenue.","2026-09-20","GigaPub Team","/og-image.png",[14,15,16,17,18],"ad-mediation","telegram-mini-apps","cpm","fill-rate","rtb",[20,23,26,29,32],{"q":21,"a":22},"What is ad mediation?","Ad mediation is a layer between an app and several sources of ad demand — ad networks and real-time bidders. The app makes one request; the mediation layer decides which source gets each impression, based on live bids and on how each source has performed for that placement and country. The developer integrates one SDK instead of one per network.",{"q":24,"a":25},"Is ad mediation the same as an ad network?","No. An ad network is one source of demand with its own advertisers. Ad mediation connects several such sources and lets them compete for every impression. GigaPub is both: it brings its own advertisers through a real-time bidding layer and mediates other ad networks behind the same SDK.",{"q":27,"a":28},"Does mediation slow down ad display?","No. Network SDKs are initialised when the app loads, not when you call showGiga(), and the real-time bidding decision is made in milliseconds. If a network fails to show, the mediation layer moves on to the next one within the same call.",{"q":30,"a":31},"Do I need to change my code when networks are added or priorities change?","No. The order in which demand sources are tried is configured on the GigaPub server per placement and country and is fetched by the SDK when your app loads. Adding a network or changing priorities never requires a new build of your Telegram Mini App.",{"q":33,"a":34},"What happens when no network has an ad?","If your app defined window.AdGigaFallback — for example the show function of a previous SDK — the mediation layer calls it as a last resort. Otherwise the promise returned by window.showGiga() rejects, and your code simply does not grant the reward.",{"type":36,"children":37,"toc":686},"root",[38,46,61,70,102,109,114,156,161,167,180,186,191,203,213,218,277,282,288,293,326,338,344,482,488,493,505,516,521,577,589,595,604,613,629,638,662,666],{"type":39,"tag":40,"props":41,"children":43},"element","h1",{"id":42},"how-ad-mediation-works-in-telegram-mini-apps-why-one-ad-network-caps-your-revenue",[44],{"type":45,"value":8},"text",{"type":39,"tag":47,"props":48,"children":49},"p",{},[50,52,59],{"type":45,"value":51},"Ad mediation is a layer between your app and several sources of ad demand. Your Telegram\nMini App makes one request; the mediation layer decides which ad network or real-time bidder\ngets that impression, and at what price. With a single ad network there is no decision to\nmake — and no competition, which is exactly why one network is a ceiling on revenue. GigaPub\nis an ad network and ad-mediation platform for Telegram Mini Apps, and this article explains\nwhat happens between the moment you call ",{"type":39,"tag":53,"props":54,"children":56},"code",{"className":55},[],[57],{"type":45,"value":58},"showGiga()",{"type":45,"value":60}," and the moment the ad appears.",{"type":39,"tag":47,"props":62,"children":63},{},[64],{"type":39,"tag":65,"props":66,"children":67},"strong",{},[68],{"type":45,"value":69},"Key takeaways",{"type":39,"tag":71,"props":72,"children":73},"ul",{},[74,80,85,90],{"type":39,"tag":75,"props":76,"children":77},"li",{},[78],{"type":45,"value":79},"A single ad network caps three things at once: fill rate (it has no demand for some\ncountries and moments), price (nobody bids against it) and uptime (its outage is your\noutage).",{"type":39,"tag":75,"props":81,"children":82},{},[83],{"type":45,"value":84},"Mediation puts several demand sources behind one SDK call and lets them compete for each\nimpression: real-time bidders first, then ad networks in a performance-based order, then\na fallback of your choice.",{"type":39,"tag":75,"props":86,"children":87},{},[88],{"type":45,"value":89},"The order is configured on the server per placement and country, so priorities change\nwithout a new build of your app.",{"type":39,"tag":75,"props":91,"children":92},{},[93,95,100],{"type":45,"value":94},"You integrate once — one script tag and one ",{"type":39,"tag":53,"props":96,"children":98},{"className":97},[],[99],{"type":45,"value":58},{"type":45,"value":101}," call — regardless of how many\nnetworks are behind it.",{"type":39,"tag":103,"props":104,"children":106},"h2",{"id":105},"why-is-one-ad-network-a-ceiling-on-revenue",[107],{"type":45,"value":108},"Why is one ad network a ceiling on revenue?",{"type":39,"tag":47,"props":110,"children":111},{},[112],{"type":45,"value":113},"Because a single network can only sell what it has demand for, at the price it decides.\nThree limits follow from that:",{"type":39,"tag":71,"props":115,"children":116},{},[117,136,146],{"type":39,"tag":75,"props":118,"children":119},{},[120,125,127,134],{"type":39,"tag":65,"props":121,"children":122},{},[123],{"type":45,"value":124},"Fill rate.",{"type":45,"value":126}," No network has advertisers for every country and every hour. When it has\nnothing to show, your user asked for a bonus and got nothing — see\n",{"type":39,"tag":128,"props":129,"children":131},"a",{"href":130},"/blog/monetization-metrics-ecpm-fill-rate-arpdau",[132],{"type":45,"value":133},"what fill rate is and how to measure it",{"type":45,"value":135},".",{"type":39,"tag":75,"props":137,"children":138},{},[139,144],{"type":39,"tag":65,"props":140,"children":141},{},[142],{"type":45,"value":143},"Price.",{"type":45,"value":145}," Without a competitor bidding for the same impression, the network's price is the\nprice. Your eCPM is whatever it chooses to pay.",{"type":39,"tag":75,"props":147,"children":148},{},[149,154],{"type":39,"tag":65,"props":150,"children":151},{},[152],{"type":45,"value":153},"Resilience.",{"type":45,"value":155}," If the network's SDK or servers have a bad day, your monetization has a\nbad day. There is no second option.",{"type":39,"tag":47,"props":157,"children":158},{},[159],{"type":45,"value":160},"Adding a second network by hand fixes none of this well: you now maintain two SDKs, and\nyour code has to decide which one to call, with no data to decide on.",{"type":39,"tag":103,"props":162,"children":164},{"id":163},"what-does-an-ad-mediation-layer-actually-do",[165],{"type":45,"value":166},"What does an ad mediation layer actually do?",{"type":39,"tag":47,"props":168,"children":169},{},[170,172,178],{"type":45,"value":171},"It answers one question for every impression: ",{"type":39,"tag":173,"props":174,"children":175},"em",{},[176],{"type":45,"value":177},"who gets this one?",{"type":45,"value":179}," To answer it, a mediation\nlayer needs three things — several demand sources connected behind one SDK, live data on how\neach source performs per placement and per country, and a rule for the order in which\nsources are tried. The developer sees none of that. The app makes one call, the layer runs\nthe competition, and one ad is shown.",{"type":39,"tag":103,"props":181,"children":183},{"id":182},"waterfall-or-real-time-competition-how-does-gigapub-decide-who-gets-the-impression",[184],{"type":45,"value":185},"Waterfall or real-time competition — how does GigaPub decide who gets the impression?",{"type":39,"tag":47,"props":187,"children":188},{},[189],{"type":45,"value":190},"Both, in a fixed order that favours the live price.",{"type":39,"tag":47,"props":192,"children":193},{},[194,196,201],{"type":45,"value":195},"A classic ",{"type":39,"tag":65,"props":197,"children":198},{},[199],{"type":45,"value":200},"waterfall",{"type":45,"value":202}," asks networks one after another in a fixed order based on historical\neCPM until one of them fills. It is simple but slow (each step waits for a timeout) and it\nuses yesterday's prices: the first network with an ad wins even when a later one would have\npaid more for this particular user.",{"type":39,"tag":47,"props":204,"children":205},{},[206,211],{"type":39,"tag":65,"props":207,"children":208},{},[209],{"type":45,"value":210},"Real-time bidding (RTB)",{"type":45,"value":212}," replaces history with a live auction: bidders see the impression\nat the same time and name a price; the highest bid wins. The price is what this impression is\nworth right now.",{"type":39,"tag":47,"props":214,"children":215},{},[216],{"type":45,"value":217},"GigaPub combines the two:",{"type":39,"tag":219,"props":220,"children":221},"ol",{},[222,232,242,259],{"type":39,"tag":75,"props":223,"children":224},{},[225,230],{"type":39,"tag":65,"props":226,"children":227},{},[228],{"type":45,"value":229},"The RTB layer looks first.",{"type":45,"value":231}," Advertisers running campaigns on the GigaPub platform and\nconnected RTB partners bid on the impression in real time. If there is a winning bid, it is\nshown.",{"type":39,"tag":75,"props":233,"children":234},{},[235,240],{"type":39,"tag":65,"props":236,"children":237},{},[238],{"type":45,"value":239},"Ad networks fill next",{"type":45,"value":241},", in an order configured per placement and country from how each\nnetwork has performed there. The order is not static: depending on the placement it can be\na strict priority list, a weighted rotation, or a round-robin; in priority mode a network\nthat has just shown an ad is de-prioritised for a short while so the user does not see the\nsame source's creative twice in a row.",{"type":39,"tag":75,"props":243,"children":244},{},[245,250,252,257],{"type":39,"tag":65,"props":246,"children":247},{},[248],{"type":45,"value":249},"If a network fails to show",{"type":45,"value":251}," — no ad, an error, an SDK that is not ready — the layer\nmoves on to the next one inside the same ",{"type":39,"tag":53,"props":253,"children":255},{"className":254},[],[256],{"type":45,"value":58},{"type":45,"value":258}," call. A failed network never ends\nthe request.",{"type":39,"tag":75,"props":260,"children":261},{},[262,267,269,275],{"type":39,"tag":65,"props":263,"children":264},{},[265],{"type":45,"value":266},"Your fallback runs last.",{"type":45,"value":268}," If your app defined ",{"type":39,"tag":53,"props":270,"children":272},{"className":271},[],[273],{"type":45,"value":274},"window.AdGigaFallback",{"type":45,"value":276},", the mediation\nlayer calls it when every source above came up empty.",{"type":39,"tag":47,"props":278,"children":279},{},[280],{"type":45,"value":281},"The whole chain is one promise: it resolves when an ad was shown and rejects when nothing\ncould be shown.",{"type":39,"tag":103,"props":283,"children":285},{"id":284},"what-does-mediation-change-in-the-numbers",[286],{"type":45,"value":287},"What does mediation change in the numbers?",{"type":39,"tag":47,"props":289,"children":290},{},[291],{"type":45,"value":292},"Three things, in the same order as the three limits above:",{"type":39,"tag":71,"props":294,"children":295},{},[296,306,316],{"type":39,"tag":75,"props":297,"children":298},{},[299,304],{"type":39,"tag":65,"props":300,"children":301},{},[302],{"type":45,"value":303},"Fill rate goes up",{"type":45,"value":305}," because several sources cover more countries and moments than any\none of them, and an unfilled request in one network is retried in the next.",{"type":39,"tag":75,"props":307,"children":308},{},[309,314],{"type":39,"tag":65,"props":310,"children":311},{},[312],{"type":45,"value":313},"eCPM goes up",{"type":45,"value":315}," because bidders compete for the impression and the best-performing\nnetwork for that country gets the first look among networks.",{"type":39,"tag":75,"props":317,"children":318},{},[319,324],{"type":39,"tag":65,"props":320,"children":321},{},[322],{"type":45,"value":323},"Revenue stops depending on one vendor's uptime.",{"type":45,"value":325}," A network that is down is simply\nskipped for as long as it stays down.",{"type":39,"tag":47,"props":327,"children":328},{},[329,331,337],{"type":45,"value":330},"How much each number moves depends on your countries, formats and audience — it is different\nfor every app, which is why the dashboard groups everything by country. Rewarded and\ninterstitial placements go through the same layer; when to use which is covered in\n",{"type":39,"tag":128,"props":332,"children":334},{"href":333},"/blog/rewarded-vs-interstitial-ads",[335],{"type":45,"value":336},"rewarded video vs interstitial ads",{"type":45,"value":135},{"type":39,"tag":103,"props":339,"children":341},{"id":340},"single-ad-network-vs-ad-mediation",[342],{"type":45,"value":343},"Single ad network vs ad mediation",{"type":39,"tag":345,"props":346,"children":347},"table",{},[348,370],{"type":39,"tag":349,"props":350,"children":351},"thead",{},[352],{"type":39,"tag":353,"props":354,"children":355},"tr",{},[356,360,365],{"type":39,"tag":357,"props":358,"children":359},"th",{},[],{"type":39,"tag":357,"props":361,"children":362},{},[363],{"type":45,"value":364},"Single ad network",{"type":39,"tag":357,"props":366,"children":367},{},[368],{"type":45,"value":369},"Ad mediation",{"type":39,"tag":371,"props":372,"children":373},"tbody",{},[374,393,411,429,447,464],{"type":39,"tag":353,"props":375,"children":376},{},[377,383,388],{"type":39,"tag":378,"props":379,"children":380},"td",{},[381],{"type":45,"value":382},"Fill rate",{"type":39,"tag":378,"props":384,"children":385},{},[386],{"type":45,"value":387},"limited to one network's demand",{"type":39,"tag":378,"props":389,"children":390},{},[391],{"type":45,"value":392},"several sources cover more countries and moments",{"type":39,"tag":353,"props":394,"children":395},{},[396,401,406],{"type":39,"tag":378,"props":397,"children":398},{},[399],{"type":45,"value":400},"Price per impression",{"type":39,"tag":378,"props":402,"children":403},{},[404],{"type":45,"value":405},"set by the network",{"type":39,"tag":378,"props":407,"children":408},{},[409],{"type":45,"value":410},"set by competition between bidders and networks",{"type":39,"tag":353,"props":412,"children":413},{},[414,419,424],{"type":39,"tag":378,"props":415,"children":416},{},[417],{"type":45,"value":418},"Country coverage",{"type":39,"tag":378,"props":420,"children":421},{},[422],{"type":45,"value":423},"strong in some geos, empty in others",{"type":39,"tag":378,"props":425,"children":426},{},[427],{"type":45,"value":428},"the best-performing source for each country goes first",{"type":39,"tag":353,"props":430,"children":431},{},[432,437,442],{"type":39,"tag":378,"props":433,"children":434},{},[435],{"type":45,"value":436},"Resilience",{"type":39,"tag":378,"props":438,"children":439},{},[440],{"type":45,"value":441},"network outage = monetization outage",{"type":39,"tag":378,"props":443,"children":444},{},[445],{"type":45,"value":446},"failed source is skipped, next one fills",{"type":39,"tag":353,"props":448,"children":449},{},[450,455,460],{"type":39,"tag":378,"props":451,"children":452},{},[453],{"type":45,"value":454},"Developer work",{"type":39,"tag":378,"props":456,"children":457},{},[458],{"type":45,"value":459},"one SDK, one call",{"type":39,"tag":378,"props":461,"children":462},{},[463],{"type":45,"value":459},{"type":39,"tag":353,"props":465,"children":466},{},[467,472,477],{"type":39,"tag":378,"props":468,"children":469},{},[470],{"type":45,"value":471},"Changing priorities",{"type":39,"tag":378,"props":473,"children":474},{},[475],{"type":45,"value":476},"new build of the app",{"type":39,"tag":378,"props":478,"children":479},{},[480],{"type":45,"value":481},"server-side config, no release",{"type":39,"tag":103,"props":483,"children":485},{"id":484},"what-does-the-publisher-have-to-do",[486],{"type":45,"value":487},"What does the publisher have to do?",{"type":39,"tag":47,"props":489,"children":490},{},[491],{"type":45,"value":492},"Almost nothing — that is the point. The integration is one script tag and one call:",{"type":39,"tag":494,"props":495,"children":500},"pre",{"className":496,"code":498,"language":499,"meta":7},[497],"language-html","\u003Cscript src=\"https://ad.gigapub.tech/script?id=YOUR_PROJECT_ID\">\u003C/script>\n","html",[501],{"type":39,"tag":53,"props":502,"children":503},{"__ignoreMap":7},[504],{"type":45,"value":498},{"type":39,"tag":494,"props":506,"children":511},{"className":507,"code":509,"language":510,"meta":7},[508],"language-js","try {\n  await window.showGiga() // the mediation layer runs the whole chain\n  grantReward()\n} catch (e) {\n  // nothing could be shown — no reward\n}\n","js",[512],{"type":39,"tag":53,"props":513,"children":514},{"__ignoreMap":7},[515],{"type":45,"value":509},{"type":39,"tag":47,"props":517,"children":518},{},[519],{"type":45,"value":520},"Three practical details:",{"type":39,"tag":71,"props":522,"children":523},{},[524,534,551],{"type":39,"tag":75,"props":525,"children":526},{},[527,532],{"type":39,"tag":65,"props":528,"children":529},{},[530],{"type":45,"value":531},"Priorities live on the server.",{"type":45,"value":533}," The SDK fetches the placement configuration when your\napp loads. Adding a network or changing the order never requires a new build.",{"type":39,"tag":75,"props":535,"children":536},{},[537,542,544,549],{"type":39,"tag":65,"props":538,"children":539},{},[540],{"type":45,"value":541},"Networks are initialised at load, not at show time.",{"type":45,"value":543}," If you call ",{"type":39,"tag":53,"props":545,"children":547},{"className":546},[],[548],{"type":45,"value":58},{"type":45,"value":550}," right\nafter the page loads, the SDK briefly waits for the networks to become ready instead of\nfailing.",{"type":39,"tag":75,"props":552,"children":553},{},[554,559,561,566,568,576],{"type":39,"tag":65,"props":555,"children":556},{},[557],{"type":45,"value":558},"Keep your previous SDK as a fallback.",{"type":45,"value":560}," Assign its show function to\n",{"type":39,"tag":53,"props":562,"children":564},{"className":563},[],[565],{"type":45,"value":274},{"type":45,"value":567},", and it becomes the last step of the chain. The docs also include a loader that switches to a backup domain when the\nprimary one is unreachable — see the\n",{"type":39,"tag":128,"props":569,"children":573},{"href":570,"rel":571},"https://docs.giga.pub/integration-guide.html",[572],"nofollow",[574],{"type":45,"value":575},"integration guide",{"type":45,"value":135},{"type":39,"tag":47,"props":578,"children":579},{},[580,582,588],{"type":45,"value":581},"The five-minute version of the setup is in\n",{"type":39,"tag":128,"props":583,"children":585},{"href":584},"/blog/integrate-sdk-in-5-minutes",[586],{"type":45,"value":587},"how to integrate the GigaPub SDK",{"type":45,"value":135},{"type":39,"tag":103,"props":590,"children":592},{"id":591},"faq",[593],{"type":45,"value":594},"FAQ",{"type":39,"tag":47,"props":596,"children":597},{},[598,602],{"type":39,"tag":65,"props":599,"children":600},{},[601],{"type":45,"value":21},{"type":45,"value":603},"\nA layer between an app and several sources of ad demand — ad networks and real-time bidders.\nThe app makes one request; the mediation layer decides which source gets each impression,\nbased on live bids and on how each source has performed for that placement and country.",{"type":39,"tag":47,"props":605,"children":606},{},[607,611],{"type":39,"tag":65,"props":608,"children":609},{},[610],{"type":45,"value":24},{"type":45,"value":612},"\nNo. An ad network is one source of demand with its own advertisers. Mediation connects\nseveral such sources and lets them compete. GigaPub is both: it brings its own advertisers\nthrough a real-time bidding layer and mediates other ad networks behind the same SDK.",{"type":39,"tag":47,"props":614,"children":615},{},[616,620,622,627],{"type":39,"tag":65,"props":617,"children":618},{},[619],{"type":45,"value":27},{"type":45,"value":621},"\nNo. Network SDKs are initialised when the app loads, not when you call ",{"type":39,"tag":53,"props":623,"children":625},{"className":624},[],[626],{"type":45,"value":58},{"type":45,"value":628},", and the\nbidding decision is made in milliseconds. A network that fails to show is skipped within the\nsame call.",{"type":39,"tag":47,"props":630,"children":631},{},[632,636],{"type":39,"tag":65,"props":633,"children":634},{},[635],{"type":45,"value":30},{"type":45,"value":637},"\nNo. The order of demand sources is configured on the server per placement and country and is\nfetched when your app loads.",{"type":39,"tag":47,"props":639,"children":640},{},[641,645,647,652,654,660],{"type":39,"tag":65,"props":642,"children":643},{},[644],{"type":45,"value":33},{"type":45,"value":646},"\nIf you defined ",{"type":39,"tag":53,"props":648,"children":650},{"className":649},[],[651],{"type":45,"value":274},{"type":45,"value":653},", it is called as a last resort. Otherwise the promise\nfrom ",{"type":39,"tag":53,"props":655,"children":657},{"className":656},[],[658],{"type":45,"value":659},"window.showGiga()",{"type":45,"value":661}," rejects and your code does not grant the reward.",{"type":39,"tag":663,"props":664,"children":665},"hr",{},[],{"type":39,"tag":47,"props":667,"children":668},{},[669,671,678,680,685],{"type":45,"value":670},"Put the mediation layer to work: register your app at ",{"type":39,"tag":128,"props":672,"children":675},{"href":673,"rel":674},"https://giga.pub",[572],[676],{"type":45,"value":677},"giga.pub",{"type":45,"value":679}," and\nfollow the ",{"type":39,"tag":128,"props":681,"children":683},{"href":570,"rel":682},[572],[684],{"type":45,"value":575},{"type":45,"value":135},{"title":7,"searchDepth":687,"depth":687,"links":688},2,[689,690,691,692,693,694,695],{"id":105,"depth":687,"text":108},{"id":163,"depth":687,"text":166},{"id":182,"depth":687,"text":185},{"id":284,"depth":687,"text":287},{"id":340,"depth":687,"text":343},{"id":484,"depth":687,"text":487},{"id":591,"depth":687,"text":594},"markdown","content:en:blog:how-ad-mediation-works.md","content","en/blog/how-ad-mediation-works.md","en/blog/how-ad-mediation-works","md",1790073279593]