Title: Map and adsense problems
Last modified: September 16, 2018

---

# Map and adsense problems

 *  [barrenas](https://wordpress.org/support/users/barrenas/)
 * (@barrenas)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/)
 * Hi i use autoptimize and async javascript and the load time improve soo much
   
   But i have problems with maps inside some routes and the adsense style, now break
   style in some routes pages Any suggestion to solve this issues? Because i really
   want use this amazing plugin Thank u

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10693173)
 * well, first off all start with AsyncJS disabled and configure Autoptimize so 
   that everything works perfectly (refer to the [AO FAQ](https://wordpress.org/plugins/autoptimize/#faq)
   for info on how to troubleshoot). Once that is working enable AsyncJS again and
   look at which of the excluded files (if any) can be asynced (or deferred) by 
   doing some trial & error.
 * hope this clarifies,
    frank
 *  Thread Starter [barrenas](https://wordpress.org/support/users/barrenas/)
 * (@barrenas)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10693333)
 * Hi
    Just this is what i did. And all work perfectly until some maps in some routes.
   Whis just AO all works but a little bit slowly, and when i set up AJs the site
   run quickly but some routes (custom post like post that generate cm routes mamager)
   doesnt load, looks empty
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10693437)
 * OK, so;
    * what errors are visible on the browser console when those custom routes
   fail to load? * have you tried not asyncing the plugin that handles those custom
   routes?
 *  Thread Starter [barrenas](https://wordpress.org/support/users/barrenas/)
 * (@barrenas)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10693809)
 * hello again:
 * in chrome console i see:
 * autoptimize_7ae5f3d039f0e30072d2e4f346287e24.js:288 Uncaught TypeError: Cannot
   read property ‘gallery’ of undefined
    at HTMLDocument.<anonymous> (autoptimize_7ae5f3d039f0e30072d2e4f346287e24.
   js:288) at i (jquery.js:2) at Object.add [as done] (jquery.js:2) at n.fn.init.
   n.fn.ready (jquery.js:2) at a.fn.init.n.fn.init (jquery.js:2) at new a.fn.init(
   autoptimize_7ae5f3d039f0e30072d2e4f346287e24.js:43) at n (jquery.js:2) at autoptimize_7ae5f3d039f0e30072d2e4f346287e24.
   js:288
 * * have you tried not asyncing the plugin that handles those custom routes?
 * i have tried it, but i have the same problem.
 * currently my AJs settings are:
 * Async JavaScript Method: defer
    jQuery: exclude Plugin: Autoptimize Enable Autoptimize
   Support: enable
 *  jQuery Method: Defer
    -  This reply was modified 7 years, 9 months ago by [barrenas](https://wordpress.org/support/users/barrenas/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10696721)
 * I’m going to have to take a look at your site, can you share the URL barrenas?
 *  Thread Starter [barrenas](https://wordpress.org/support/users/barrenas/)
 * (@barrenas)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10699021)
 * Hi
 * Yes of couse:
 * I think that MAPS problem, its solved, but im not sure. I desactivated AJs, and
   deleted completly the AO cache, latter i reactivated AJs with the settings that
   i told in the othe comment.
 * But ADSENSE problem continue, the style is broken.
    The site is [https://routeler.com/](https://routeler.com/)
   And for example a conflictive post is [https://routeler.com/maps-routes/best-things-to-do-in-vienna-freyung-tour-and-route/](https://routeler.com/maps-routes/best-things-to-do-in-vienna-freyung-tour-and-route/),
   there are two adsense one on head other on sidebar on right, works with adinsert
   and text widget respective
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10700333)
 * so do you use a plugin to add AdSense barrenas? have you tried excluding that
   from AsyncJS?
 *  Thread Starter [barrenas](https://wordpress.org/support/users/barrenas/)
 * (@barrenas)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10700612)
 * Hi
 * For the head adsense i use adinsert plugin, i will try to exclude and telling
   u.
 * But for sidebar adsense i just use the text widget of wordpress, how its possible?
 * Bouth of them.lost the style in some post like [https://routeler.com/maps-routes/best-things-to-do-in-vienna-freyung-tour-and-route/](https://routeler.com/maps-routes/best-things-to-do-in-vienna-freyung-tour-and-route/),
   almlst in my computer using chrome.
 * Thanks again for ur help

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Map and adsense problems’ is closed to new replies.

 * ![](https://ps.w.org/async-javascript/assets/icon-128x128.png?rev=1839260)
 * [Async JavaScript](https://wordpress.org/plugins/async-javascript/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/async-javascript/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/async-javascript/)
 * [Active Topics](https://wordpress.org/support/plugin/async-javascript/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/async-javascript/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/async-javascript/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [barrenas](https://wordpress.org/support/users/barrenas/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/map-and-adsense-problems/#post-10700612)
 * Status: not resolved