diff --git a/freeciv-web/src/main/webapp/WEB-INF/config.properties.dist b/freeciv-web/src/main/webapp/WEB-INF/config.properties.dist index d9e7e666e..c0b9093f4 100644 --- a/freeciv-web/src/main/webapp/WEB-INF/config.properties.dist +++ b/freeciv-web/src/main/webapp/WEB-INF/config.properties.dist @@ -3,6 +3,6 @@ savegame_dir=/var/lib/tomcat8/webapps/data/savegames/ email_username=username email_password=password google-signin-client-key=122428231951-2vrvrtd9sc2v9nktemclkvc2t187jkr6.apps.googleusercontent.com -# Used in some messages and to distribute minimized or expanded js files, -# so put the production server even when testing. +#trackjs-token=ee5dba6fe2e048f79b422157b450947b +# Used in some messages, so put the production server even when testing. fcw_host=example.com diff --git a/freeciv-web/src/main/webapp/WEB-INF/jsp/fragments/head.jsp b/freeciv-web/src/main/webapp/WEB-INF/jsp/fragments/head.jsp index 558035e6e..c4b232f92 100644 --- a/freeciv-web/src/main/webapp/WEB-INF/jsp/fragments/head.jsp +++ b/freeciv-web/src/main/webapp/WEB-INF/jsp/fragments/head.jsp @@ -1,3 +1,16 @@ +<%@ page import="static org.apache.commons.lang3.StringUtils.stripToNull" %> +<%@ page import="java.util.Properties" %> +<%@ page import="java.io.IOException" %> +<% + String trackJsToken = null; + try { + Properties prop = new Properties(); + prop.load(getServletContext().getResourceAsStream("/WEB-INF/config.properties")); + trackJsToken = stripToNull(prop.getProperty("trackjs-token")); + } catch (IOException e) { + e.printStackTrace(); + } +%>