Lorem ipsum dolor sit amet, consectetur adipiscing elit. Test link
Bài đăng

Khắc phục google adsense load nhanh trong blog

Trì hoãn việc tải tập lệnh này để bắt đầu tải nó 5 giây sau khi trang được tải đầy đủ. Đây là một mẹo rất hữu ích cho các trang web SEO hay trang web được sử dụng wordpress ,blog để xây dựng.


Mặc định khi tích hợp

<script async src = "// pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> </script>

 <ins class = "adsbygoogle" style = "display: inline-block; width: 728px; height: 90px" data-ad-client = "ca-pub- UNIQUE_ACCOUNT # " data-ad-slot = " UNIQUE_AD # "> </ins> 
<script> (adsbygoogle = window.adsbygoogle || []). push ({}); </script>

Sau 5s hay cho chạy google ads
Triển khai điều này giúp website của bạn chạy nhanh hơn trước khi sử dụng:

<ins class = "adsbygoogle" style = "display: inline-block; width: 728px; height: 90px" data-ad-client = "ca-pub- UNIQUE_ACCOUNT # " data-ad-slot = " UNIQUE_AD # "> </ins> 
<script type = 'text / javascript'> 
(thuchien() {
    var done = false;
    var script = document.createElement('script');
    script.async = true;
    script.type = 'text / javascript';
    script.src = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
    var createScript = setTimeout(chức năng() {
        document.getElementsByTagName('HEAD').item(0).appendChild(script);
    }, 5000);
    script.onreadystatechange = script.onload = function(e) {
        if (!done && (!this.readyState || this.readyState == 'load' || this.readyState == 'complete')) {
            (adsbygoogle = window.adsbygoogle || []).push({});
        }
    };
})();
 </script>







Đăng nhận xét

© Lưu Đức Huy IT. All rights reserved. Premium By Raushan Design