We would like municipalities to be able to add a tracking code for their analytics solution, so they are able to track pageviews on Signalen.
Possible solution design
Add the ability to mount an additional file in the container (e.g. /extend_body.html). This contents of this file is added to the HTML body in index.html during runtime via start.sh.
The contents of this HTML can then be controlled via a value in the Helm chart:
htmlBodyExtend: |
<script async src="https://siteimproveanalytics.com/js/siteanalyze_000000.js"></script>
The content of the value can be added to a ConfigMap and mounted on /extend_body.html in the container.
Considerations
- We could also consider using the existing configuration JSON, but formatting HTML in a JSON value can be challenging.
- We can consider moving to YAML for the app configuration, then adding HTML as a value can become easier as well.
We would like municipalities to be able to add a tracking code for their analytics solution, so they are able to track pageviews on Signalen.
Possible solution design
Add the ability to mount an additional file in the container (e.g.
/extend_body.html). This contents of this file is added to the HTML body in index.html during runtime via start.sh.The contents of this HTML can then be controlled via a value in the Helm chart:
The content of the value can be added to a ConfigMap and mounted on
/extend_body.htmlin the container.Considerations