...
This is the consolidated list of changes between Tapestry versions 5.3 and 5.4. To upgrade to 5.4, most users who are not using deprecated features will be able to just update the Maven dependency version in their Maven POM file or Gradle build script (or download the new JAR filefiles) and the new version will just work. However, please read carefully below before upgrading, and also review the How to Upgrade instructions.
...
In prior versions of Tapestry, JavaScript libraries injected into the page (via the <a href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Import.html">@Import</a> @Import annotation, or via <a href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptSupport.html">JavaScriptSupport</a>), were injected into the <head> element of the HTML page, either at the end of the element, or before any existing <script> element.
With this release, the <script> tags now occur at the bottom of the <body> tag. This may affect a small number of JavaScript libraries, such as <a href="http://www.google.com/analytics/">Google Analytics</a> Google Analytics that need to be placed at the top of the page; in those cases, the library should be added to your the template of your application's main layout component, instead of relying on @Import and JavaScriptSupport.
...