Hello,
i need to insert the data-cfasync=“false” before the src="" of google maps V2 as stated here
I’musing the Map V2 -> Map type Google.
Can you point me in the right direction?
Thanks.
Hello,
i need to insert the data-cfasync=“false” before the src="" of google maps V2 as stated here
I’musing the Map V2 -> Map type Google.
Can you point me in the right direction?
Thanks.
Hi,
Kindly refer to the link below
Hope that helps.
Hi,
I read all the post you recommended, I also found another in the comments but …cough I think I need some help. 
I do not know exactly what to target. I tried to insert in the array all the addresses that are used to generate the map. Then I realized that they are generated and not static, so not influenced by the script (if I understood correctly).
I know that this kind of customization would not be included with your support … but if you were so kind to guide me I would really appreciate it.
Have a nice day 
HI There,
Unfortunely this request would be out of the scope of our support, I reccomend you hiring a developer, you can find affordable help on UpWork for example.
Thanks for understading
Ok, thanks! In the meantime can you explain in which way the Map java scripts are injected in the header? Where do i have to look?
Let’s take this script:
add_filter( ‘script_loader_tag’, function ( $tag, $handle ) {
if ( 'script-handle' !== $handle )
return $tag;
return str_replace( "type='text/javascript' src", ' data-cfasync="false" src', $tag );
}, 10, 2 );
what is my ‘script handle’ for map v2?
Hi there,
It’s not doable, the scripts are generated by google map API itself. It’s the same reason the builder is unable to capture the map preview since the script generation is created on-fly, and not by script enqueue. You can verify that by checking the code through browser inspector and by viewing it through source code. I think it happens after Google implemented the v3 API it caused issues on the builder as well.
And I also similar issues where the scripts are not optimized as Google as reported, but the same scripts are generated by them 
Thanks!
I was thinking the same! Thank you for confirming that. May Google be damned 
You are most welcome!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.