Questions about editing index.html in the theme/web folder

0
Iv added an index.html file to the theme/web folder to allow me to add google tag analytics to the head and bosy of the web page but i have the following questions about doing so:   what happens if the layout/theme updates, do we loose the index.html file? is there a way to run these scripts only on prod. by using an environment variable for example?
asked
1 answers
1

I believe the index.html in your theme folder will always overwrite the index.html generated from the mendix deployment process. 

You can use JS within script tags to for instance access the remoteUrl to determine the environment. 

https://apidocs.rnd.mendix.com/8/client/mx.html

 

answered