My website got loaded with google analytic and google ads javascript library hosted elsewhere in google server.
It will attempt to download and re-write some part of the content with the relevant ads. (yes, I got paid for that traffic . )
Recently with some optimisation done on the theme, it found out only the above javascript got WARNING, and it tried to perform document.write while the javascript file been deferred until all content being downloaded.
I was wondering how to make it work again.
Then I found this page at google support which provide guideline how to change it to async call instead of blocking call in previous version.
Here is how to do it.
For Google Ads:
Before:
After:
note : please edit the client-ad and slot id with yours.
For Google Analytic :
Change to:
and that’s it, it is now being deferred and making async call while loading the ads content.
Nice !!
Reference:
1. Adsense Support
2. Google Analytic
Here are five key communication skills that help you speak with clarity and influence: Speak…
Are you ready to unlock your full potential as a man?Discover powerful insights, real-life transformations,…
One day we will set aside one whole day to review the whole lesson we…
Last weekend, 07/12/2024 I managed to join Dev Fest Kuala Lumpur 2024, organized by Google…
TIPS BACAAN AL-QURANOleh: Dr. Muhd al-Muhaysni.1. Jangan engkau berikan (fokus membaca) al-Quran pada lebihan waktumu…
Selawat yang ringkas, yang mana apabila kamu membacanya satu kali sebanding 100 ribu kali, jadi…
Leave a Comment