We have multiple Guacamole servers and I'd like to do web analytics to see how 
much they're being used, and when.

umami (and it would be similar for Google Analytics) requires adding a script 
into the <head> section (https://umami.is/docs/collect-data). I created an 
extension with the following html file, and was hoping it would work:
<meta name="before-children" content="head">
<script async defer data-website-id="GUID" 
src="https://analytics.example.com/umami.js";></script>

The Tomcat log says the extension loaded but it didn't appear to work, as meta 
is trying to insert the line before the children of a CSS tag called "head" 
(https://guacamole.apache.org/doc/gug/guacamole-ext.html#updating-existing-html),
 which doesn't exist.

I considered using the js extension resource instead of html, to copy the 
JavaScript file, but I need to include the GUID for the website so I'm not sure 
this would work.

Is there a way to insert the script line into the head using an extension? Or 
could there another way to achieve something similar?

Thanks

Reply via email to