Support » Plugin: Autoptimize » Can i enable Javascript caching when i use Google adsense?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Frank Goossens

    (@futtta)

    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).

    Thread Starter liton1980

    (@liton1980)

    OK, thanks a lot for your good support.

    Plugin Author Frank Goossens

    (@futtta)

    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.

    Thread Starter liton1980

    (@liton1980)

    OK, i place a sample adsense here:

    <script type="text/javascript">
    google_ad_client = "pub-";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text_image";
    google_color_border = "FFFFFF";
    google_color_bg = "0000FF";
    google_color_link = "FFFFFF";
    google_color_text = "000000";
    google_color_url = "008000";
    </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

    Should u exclude show_ads.js?

    Plugin Author Frank Goossens

    (@futtta)

    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).

    Thread Starter liton1980

    (@liton1980)

    So its not needed that i exclude anything for running Google adsense?

    Plugin Author Frank Goossens

    (@futtta)

    If all you have is the above block of code; correct, nothing to exclude.

    But pray do test dear Sir! 😉

    Thread Starter liton1980

    (@liton1980)

    OK, thanks again for your excellent support.

    hello,
    Can i ask something here please.
    When i load my site asyncr, i dont see the adsense on my site.
    What can i do?
    tnx

    Plugin Author Frank Goossens

    (@futtta)

    difficult to say based on that info xpiramide;

    * what do you mean by “I load my site asyncr”?
    * how do you load adsense?

    hey hello,
    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.

    Plugin Author Frank Goossens

    (@futtta)

    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,
    frank

    Hey futtta,
    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.
    Paul

    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:
    //pagead2.googlesyndication.com/pagead/js/adsbygoogle.js

    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.

    Udpate:

    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–>

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Can i enable Javascript caching when i use Google adsense?’ is closed to new replies.