Header ads

How to Speed ​​Up Loading MGID Ads on Blogger


How to Speed ​​Up Loading MGID Ads on Blogger


One of the MGID advertising network platforms based in the USA is now gaining popularity in India, which can be a source of income for bloggers as publishers like Google Adsense .

Many Indonesian publishers are now starting to use MGID to monetize their blog sites, usually paired together with Google Adsense. MGID is a type of Native Ads ad or ad that blends in and resembles a part of a blog article with several ad formats selected.

Just like Google Adsense, at the end of each month between the 28th to 30th MGID will pay each publisher after reaching the payment threshold of $ 100 USD through several options there are Paypal, Payoneer and Bank Transfer. However, most publishers prefer payment via paypal because it is easy and straightforward, even though there is a admin fee deduction from paypal of 4.5% + $ 0.3 plus the cost of currency conversion when making withdrawals to local banks.

Just like other script codes, MGID ads also simply add to the loading of the blog even though the JS is asynchronous. Well, here Namina will try to share tips on How to Speed ​​Up Loading MGID Ads on Blogger .

How to Speed ​​Up Loading MGID Ads on Blogger


The tips that I will share are the way it works the same as Lazy Load Adsense. Namely, the ad content will appear when we scroll the page down.

Usually the ad code provided by MGID to be posted on a blog like this is an example. Keep in mind, below is only a sample code. Please adjust to your blog's MGID ad code.

<!-- Composite Start -->
<div id="M517582ScriptRootC780378">
        <div id="M517582PreloadC780378">
        Loading...    </div>
    </div>
<script>
        (function () {
        var script = document.createElement('script');
        script.src = "//jsc.mgid.com/b/i/namina_kiky.com.780378.js?t=" +  ((d = new Date()) ? '' + d.getUTCFullYear() + d.getUTCMonth() + d.getUTCDate() + d.getUTCHours() : '');
        script.async = true;
        document.body.appendChild(script);
    })();

</script>
<!-- Composite End -->

Then copy the code marked above (Can be saved first in notepad) then save it as a JS file on Github or other JS, HTM hosting providers. For example by namemgid.js

<!-- Composite Start -->
<div id="M517582ScriptRootC780378">
<div id="M517582PreloadC780378">
Loading... </div>
</div>
<script>
//<![CDATA[

var lazymgid = false;

window.addEventListener("scroll", function(){

if ((document.documentElement.scrollTop != 0 && lazymgid === false) || (document.body.scrollTop != 0 && lazymgid === false)) {

(function() { var ad = document.createElement('script'); ad.type = 'text/javascript'; ad.async = true; ad.src = '
LINK HOSTING kode-mgid.js SIMPAN DI SINI'; var sc = document.getElementsByTagName('script')[0]; sc.parentNode.insertBefore(ad, sc); })();
lazymgid = true;

}

}, true);

//]]>

</script>
<!-- Composite End -->

In the code that is marked, paste the link from mgid.jsthat which was hosted earlier. Then add the code above in the Layout on the widget.

If you want to display more than one widget for MGID ad content, you only need to re-host the new code and make sure the name of the hosted JS is different from the first, for example mgid2.jsand also change the name lazymgidwith lazymgid2and so on.

<!-- Composite Start -->
<div id="M517582ScriptRootC780378">
<div id="M517582PreloadC780378">
Loading... </div>
</div>
<script>
//<![CDATA[

var
lazymgid2 = false;
window.addEventListener("scroll", function(){

if ((document.documentElement.scrollTop != 0 &&
lazymgid2 === false) || (document.body.scrollTop != 0 && lazymgid2 === false)) {
(function() { var ad = document.createElement('script'); ad.type = 'text/javascript'; ad.async = true; ad.src = '
LINK HOSTING kode-mgid2.js SIMPAN DI SINI'; var sc = document.getElementsByTagName('script')[0]; sc.parentNode.insertBefore(ad, sc); })();
lazymgid2 = true;
}

}, true);

//]]>

</script>
<!-- Composite End -->

That's from Keviritw for How to Speed ​​Up Loading MGID Ads on Blogger, hopefully useful.

Post a Comment

0 Comments