Autoptimize already excludes some of adsense's code (show_ads.js, google_ad, document.write), so I'd start of excluding nothing and see where that leads you. If need be, you can exclude more either in the admin interface as you did for visual composser or, e.g. when putting the adsense code in a widget, by wrapping it in between nopitimize-tags (cfr. the faq).
OK, thanks a lot for your good support.
Cfr. your question in the frontier-theme forum;
I don't know AdSense that well, but the standard adsense-scripts are excluded by default, meaning you don't have to do a thing. You might have to do some tweaking if you use adsense-placeholders (in html-comments) or if you use other wordpress plugins that do AdSense for you.
OK, i place a sample adsense here:
Should u exclude show_ads.js?
no, this should work as is (cfr. code in http://plugins.svn.wordpress.org/autoptimize/tags/1.6.6/classes/autoptimizeScripts.php, "google_ad" string will match for the first script-block and "show_ads.js" for the 2nd script block).
So its not needed that i exclude anything for running Google adsense?
If all you have is the above block of code; correct, nothing to exclude.
But pray do test dear Sir! ;-)
OK, thanks again for your excellent support.
Can i ask something here please.
When i load my site asyncr, i dont see the adsense on my site.
What can i do?
difficult to say based on that info xpiramide;
* what do you mean by "I load my site asyncr"?
* how do you load adsense?
Before i was chance my website i load adsense Sync
and now i make the site async en take the async adsense too.
When i take the Sync adsense, than you see the adsense.
Thnx for your answer.
well, if the async code you use is the one shown on https://support.google.com/adsense/answer/3221666?hl=en, then you should exclude "adsbygoogle" and maybe explicitely "adsbygoogle.js" as well.
hope this helps,
Thanks for your answer.
I dont know or i can fix it.
I gone look of i can fix that buth ??
So mutxh thanks again and see you later.
Sorry to pick up this again.
I just installed autoptimize on my blog, and it's the first minimize plugin that's not messing up my layout. That's great. Thx for this work.
Regarding adsense i think you have to exclude the following:
I am not a pro. But in google adsense guidelines it's written that you are not allowed to change the adsense code.
If i don't exlude the line above, my adsense is working but the code is changed (lines ar missing etc). And i think you can get problems with google because of that.
Maybe i should say that i am using adrotate to dysplay my ads.
And i found a better solution. In adrotate you can just put this one before ads <!--noptimize--> and this one after ads <!--/noptimize-->
This topic has been closed to new replies.