I have tested an integration with the G1 Gmaps plugin, this works on my local setup:
https://github.com/rlankhorst/complianz-gdpr/compare/G1-Gmaps-integration?expand=1
You can download this branch from Git (integration module will also be shipped with the next update), or add some custom code as shown below. You can put this in a mu-plugin (recommended) or in your theme’s functions.php:
/**
* These are the scripts that will be blocked, you can also put them in the
* script center, but this is how it's used in the integration module
*/
add_filter('cmplz_known_script_tags', 'cmplz_wp_google_maps_widget_script');
function cmplz_wp_google_maps_widget_script($tags){
$tags[] = 'g1-gmaps.js';
$tags[] = 'infobox_packed.js';
$tags[] = 'maps.googleapis.com';
return $tags;
}
/**
* This makes sure the scripts are loaded in the correct order, which may have
* been the problem on your site
*/
add_filter('cmplz_dependencies', 'cmplz_contactform7_dependencies');
function cmplz_contactform7_dependencies($tags){
$tags['maps.googleapis.com']='g1-gmaps.js';
return $tags;
}
/**
* Add placeholder for google maps. Not necessary, but looks nice.
* @param $tags
*
* @return mixed
*/
function cmplz_g1maps_placeholder($tags){
$tags['google-maps'] = 'g1gmap-main';
return $tags;
}
add_filter('cmplz_placeholder_markers', 'cmplz_g1maps_placeholder');