Код:
<div id="yandex_rtb_R-A-XXXXXX-25_30"></div>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(function(w, d, n, s, t) {
if(window.innerWidth >= 768) { var rtbBlockID = "R-A-XXXXXX-25"; }
else { var rtbBlockID = "R-A-XXXXXX-30"; }
w[n] = w[n] || [];
w[n].push(function() {
Ya.Context.AdvManager.render({
blockId: rtbBlockID,
renderTo: "yandex_rtb_R-A-XXXXXX-25_30",
async: true,
}, function() {
var g = document.createElement("ins");
g.className = "adsbygoogle";
g.style.display = "block";
g.setAttribute("data-ad-client", "ca-pub-ZZZZZZZZZZZZZ");
g.setAttribute("data-ad-slot", "YYYYYYYYYYYY");
g.setAttribute("data-ad-format", "auto");
g.setAttribute("data-full-width-responsive", "true");
document.getElementById("yandex_rtb_R-A-XXXXXX-25_30").appendChild(g);
(adsbygoogle = window.adsbygoogle || []).push({});
});
});
t = d.getElementsByTagName("script")[0];
s = d.createElement("script");
s.type = "text/javascript";
s.src = "//an.yandex.ru/system/context.js";
s.async = true;
t.parentNode.insertBefore(s, t);
})(this, this.document, "yandexContextAsyncCallbacks");
</script>