প্রিলোড বিজ্ঞাপন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
বিজ্ঞাপন প্লেসমেন্ট API adBreak()
কলে ব্যবহারের জন্য বিজ্ঞাপনগুলি ডাউনলোড করে এবং ক্যাশে করে। ডিফল্টরূপে এটি বিজ্ঞাপন ডাউনলোড করার সর্বোত্তম সময় নির্ধারণ করতে স্বয়ংক্রিয় হিউরিস্টিকসের একটি সেট ব্যবহার করে। যাইহোক, এই হিউরিস্টিকসের অর্থ হতে পারে যে আপনার গেমের প্রথম প্লেসমেন্টের আগে একটি বিজ্ঞাপন এখনও লোড করা হয়নি (যেমন আপনার গেমটি লোড হওয়ার সাথে সাথে adBreak()
এ আপনার প্রথম কল)।
আপনি adConfig()
কল ব্যবহার করে এই আচরণটি অ্যাডজাস্ট করতে পারেন যাতে অবিলম্বে বিজ্ঞাপনের প্রিলোডিং বাধ্যতামূলক করা যায়।
<script async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-123456789"
crossorigin="anonymous">
</script>
<script>
window.adsbygoogle = window.adsbygoogle || [];
var adBreak = adConfig = function(o) {adsbygoogle.push(o);}
adConfig({preloadAdBreaks: 'on'});
</script>
গুরুত্বপূর্ণ : আপনি যদি বিজ্ঞাপনের প্রিলোডিং জোর করতে চান, তাহলে আপনাকে adBreak()
এ প্রথম কলের আগে এই কলটি করতে হবে। একবার আপনি preloadAdBreaks
এর জন্য একটি মান সেট করে ফেললে, এটি পরিবর্তন করার পরবর্তী যেকোনো প্রচেষ্টা উপেক্ষা করা হয়।
আপনার গেমের প্রথম দিকে বিজ্ঞাপন দেখানো নিশ্চিত করতে, আপনি করতে পারেন:
-
adConfig({preloadAdBreaks: 'on'})
কল করে বিজ্ঞাপনগুলি প্রিলোড করা হয়েছে তা নিশ্চিত করুন। এটি নিশ্চিত করে যে adBreak()
এ প্রথম কলের আগে একটি বিজ্ঞাপন যাওয়ার জন্য প্রস্তুত রয়েছে। -
data-ad-frequency-hint
কমিয়ে দিন যাতে বিজ্ঞাপনগুলি আরও ঘন ঘন দেখা যায়।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Ads Placement API downloads and caches ads for use within your game, utilizing heuristics to optimize download timing.\u003c/p\u003e\n"],["\u003cp\u003eYou can force immediate ad preloading by calling \u003ccode\u003eadConfig({preloadAdBreaks: 'on'})\u003c/code\u003e before your first \u003ccode\u003eadBreak()\u003c/code\u003e call.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure early ad display, preload ads and adjust \u003ccode\u003edata-ad-frequency-hint\u003c/code\u003e for increased frequency.\u003c/p\u003e\n"]]],["The Ads Placement API manages ad downloads and caching for `adBreak()` calls. To ensure ads are ready for the initial placement, use `adConfig({preloadAdBreaks: 'on'})` to force immediate preloading before the first `adBreak()` call. This overrides the default automatic heuristics. Setting `preloadAdBreaks` can only happen once, as subsequent changes are ignored. Another method for early ads is to reduce `data-ad-frequency-hint` so ads are shown more often.\n"],null,["# Preload ads\n\nThe Ads Placement API downloads and caches ads for use in `adBreak()` calls.\nBy default it uses a set of automatic heuristics to determine the best times to\ndownload ads. However, these heuristics may mean that an ad has not yet been\nloaded before the very first placement in your game (such as your first call to\n`adBreak()` just as your game is loading).\n\nYou can adjust this behaviour using the `adConfig()` call to force preloading of\nads immediately as follows. \n\n \u003cscript async\n src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=\u003cvar translate=\"no\"\u003eca-pub-123456789\u003c/var\u003e\"\n crossorigin=\"anonymous\"\u003e\n \u003c/script\u003e\n \u003cscript\u003e\n window.adsbygoogle = window.adsbygoogle || [];\n var adBreak = adConfig = function(o) {adsbygoogle.push(o);}\n adConfig({preloadAdBreaks: 'on'});\n \u003c/script\u003e\n\n**Important** : If you want to force preloading of ads, you\nshould make this call before the first call to `adBreak()`. Once\nyou've set a value for `preloadAdBreaks`, any subsequent attempts to\nchange it are ignored.\n\nTo help ensure that ads show early in you game, you can:\n\n1. Make sure that ads are preloaded by calling `adConfig({preloadAdBreaks: 'on'})`. This ensures that there is an ad ready to go before the first call to `adBreak()`.\n2. Reduce the `data-ad-frequency-hint` so that ads show more frequently."]]