Developer forum

Forum » CMS - Standard features » Maps - google scripts

Maps - google scripts

Rene Poulsen
Reply

Hi,

When I attach the Maps module to a page, you automatically attach the maps script to the page in the head tag. Is it possible to disable this, so I can insert it whereever I want to. This woul be really nice, because then I could also make it async and defer - and my pagespeed score would go from 61 to 88 (the map scripts are quite heavy!).


Replies

 
Nicolai Høeg Pedersen
Reply

Hi René

That is not possible.

Dynamicweb adds javascript to the Javascripts template tag in the layout template - which expects the tag to be in the header... And if it is not in the header, it adds it...

On the head node, you can add disableparsing:true (<head data-settings="disableparsing:true">) and Dynamicweb will leave it alone. Then you can add the @Javascript tag to just before the body end.

BR Nicolai

 
Rene Poulsen
Reply

Hi Nicolai,

Let's say I add dat-settings="disableparsing:true;" to the head elmement. Will I then be able to insert your analytics script + the google maps script manually? Will the statistics module still be working if I do it this way, instead of using the @Javascript tag?

 

You must be logged in to post in the forum