There is a page where content is loaded by scrolling by an Ajax, among this content there are blocks with google adsense ads. The problem is that I can not add this advertisement.

Here is the original code I use.

<ins class="adsbygoogle" style="display:inline-block;width:271px;height:398px" data-ad-client="ca-pub-9426180910051973" data-ad-slot="4707289646"> </ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> 

But when I try to load Ajax nothing happens.

    1 answer 1

    In general, this part of the code loads ads asynchronously, i.e. "Ajax".

    (adsbygoogle = window.adsbygoogle || []).push({});

    After adding a block with an advertisement, run this code and the advertisement will be added to the missing blocks.