Title: Referencing Google Map Scripts
Last modified: May 2, 2022

---

# Referencing Google Map Scripts

 *  [aafitmanager](https://wordpress.org/support/users/aafitmanager/)
 * (@aafitmanager)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/referencing-google-map-scripts/)
 * Hi – having a few problems trying to get Google’s Place API auto address complete
   to play nice with debloat.
 * Understand the method for excluding a script when it’s sitting on the server 
   itself, is there a different form for offsite scripts that are performing callbacks
   such as [https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap](https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap)
 * In my case for Google Address autocomplete, getting debloat to ignore these:
 * 1) `<script type="text/javascript" src="https://myserver.com/wp-content/plugins/
   fc-google-address-autocomplete/js/google-address-autocomplete-118.min.js" id="
   fc-gaa-google-address-autocomplete-js"></script>`
 * I believe this is just add the following to the exclusions: wp-content/plugins/
   fc-google-address-autocomplete/js/google-address-autocomplete-118.min.js
 * 2) `<script type="text/javascript" src="https://maps.googleapis.com/maps/api/
   js?key=myAPIkey&libraries=places&callback=GoogleAddressAutocomplete.init" id="
   fc-gaa-google-address-api-js"></script>`
 * This is the one I’m having issues with, what should I put into the exclusion 
   box?
 * I’ve tried just using the ids,
    id:fc-gaa-google-address-api-js id:fc-gaa-google-
   address-autocomplete-js
 * but google autocomplete works when debloat JS optimisation is off, and (I’m assuming
   through my inept use of the exclusions) doesn’t work with debloat’s JS defer 
   optimisation on.
 * what should I be writing in there?
 * regards Philip
    -  This topic was modified 3 years, 11 months ago by [aafitmanager](https://wordpress.org/support/users/aafitmanager/).

The topic ‘Referencing Google Map Scripts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/debloat.svg)
 * [Debloat - Remove Unused CSS, Optimize JS](https://wordpress.org/plugins/debloat/)
 * [Support Threads](https://wordpress.org/support/plugin/debloat/)
 * [Active Topics](https://wordpress.org/support/plugin/debloat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/debloat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/debloat/reviews/)

## Tags

 * [callbacks](https://wordpress.org/support/topic-tag/callbacks/)

 * 0 replies
 * 1 participant
 * Last reply from: [aafitmanager](https://wordpress.org/support/users/aafitmanager/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/referencing-google-map-scripts/)
 * Status: not resolved