Load 3rd-Party JS without hurting PageSpeed Insight Score

Is Google AdSense, Facebook SDK, Twitter Platform JS affecting your PageSpeed Insight score?

Don’t worry! I have come up with a solution. :wink:

Audio starts from 0:24


Is this method make page loading faster in real or its only good for pagespeed score ?

PSI only.

In this case u are likely using auto adsense?

The issue is coming on how to place gtm code for ad tags which are in a precise location.

lets assume there is a sidebar ad tag. It is in the sidebar. I place this sidebar adsense ad code in GTM.

Now, how do i make GTM execute that sidebar ad in the sidebar only?? Via CSS or how? please let me know ur thought.

In that case, I would recommend a simple approach: Using regular Ad units.

Just load once adsbygoogle.js from the GTM > Add new Tag > custom HTML > Trigger on All pages.

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

Rest part can be inserted via HTML Widget in the WordPress.

<!-- GK Sidebar ad units -->
<ins class="adsbygoogle"
     (adsbygoogle = window.adsbygoogle || []).push({});
1 Like

will this make Analytics plugin redundant if I load analytics from gtag?

So what is the benefit

Yes, it will work.

1 Like

Just show off for the fun! :joy:


in search console you see that page speed report… those all red might become yellow or green


I don’t use GTM. So how can I use this?